:root {
  --bg: #07080b;
  --panel: #11141a;
  --panel-2: #181c24;
  --text: #f5f5f2;
  --muted: #8e95a3;
  --accent: #d9ff6a;
  --danger: #ff5b5b;
  --success: #5cff94;
  --card: #fbfaf5;
  --line: rgba(255,255,255,.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(217,255,106,.18), transparent 34%),
    linear-gradient(145deg, #07080b, #11141a);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  display: grid;
  place-items: center;
}

.app {
  width: min(430px, 100%);
  min-height: 100vh;
  padding: 28px 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.eyebrow,
.label {
  color: var(--muted);
  margin: 0 0 4px;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: 42px;
  letter-spacing: -.06em;
}

h2 {
  margin: 0;
  font-size: 28px;
}

.bank {
  text-align: right;
  background: rgba(255,255,255,.07);
  border: 1px solid var(--line);
  padding: 10px 14px;
  border-radius: 18px;
}

.bank span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.bank strong {
  font-size: 20px;
}

.table {
  flex: 1;
  background: rgba(17,20,26,.82);
  border: 1px solid var(--line);
  border-radius: 34px;
  padding: 22px;
  display: grid;
  grid-template-rows: minmax(150px, auto) auto minmax(150px, auto);
  align-content: space-between;
  gap: 24px;
  box-shadow: 0 30px 80px rgba(0,0,0,.35);
  transition: border-color .25s ease, box-shadow .25s ease;
}

.table.win {
  border-color: rgba(92, 255, 148, .45);
  box-shadow: 0 30px 80px rgba(0,0,0,.35), 0 0 24px rgba(92, 255, 148, .13);
}

.table.lose {
  border-color: rgba(255, 91, 91, .45);
  box-shadow: 0 30px 80px rgba(0,0,0,.35), 0 0 24px rgba(255, 91, 91, .13);
}

.row {
  min-height: 150px;
}

.cards {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.card {
  width: 72px;
  height: 102px;
  border-radius: 16px;
  background: var(--card);
  color: #111;
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-weight: 800;
  font-size: 22px;
  box-shadow: 0 12px 24px rgba(0,0,0,.22);
}

.card.red {
  color: #d33131;
}

.card.back {
  background:
    repeating-linear-gradient(45deg, #f8f7f1 0 5px, #101010 5px 8px);
  color: transparent;
}

.card .suit {
  align-self: flex-end;
  font-size: 26px;
}

.message {
  width: min(78%, 280px);
  justify-self: center;
  align-self: center;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  color: var(--text);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 700;
  text-align: center;
  letter-spacing: .01em;
  min-height: 34px;
  display: grid;
  place-items: center;
}

.controls {
  background: rgba(17,20,26,.86);
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 16px;
  display: grid;
  gap: 12px;
}

.bet-panel,
.actions {
  display: grid;
  grid-template-columns: 52px 1fr 52px;
  gap: 10px;
  align-items: center;
  text-align: center;
}

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

button {
  border: 0;
  border-radius: 18px;
  min-height: 52px;
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  background: #252a35;
  cursor: pointer;
}

button:disabled {
  opacity: .38;
  cursor: not-allowed;
}

button.primary {
  background: var(--accent);
  color: #111;
}

button.round {
  border-radius: 50%;
}

#bet {
  font-size: 24px;
}

@media (min-width: 700px) {
  .app {
    min-height: 780px;
  }
}





.card.dealing {
  animation: dealCard .34s cubic-bezier(.2,.8,.2,1) both;
}

@keyframes dealCard {
  0% {
    opacity: 0;
    transform: translateY(-26px) scale(.88) rotate(-7deg);
  }

  65% {
    opacity: 1;
    transform: translateY(2px) scale(1.01) rotate(1deg);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0deg);
  }
}

.table.win .card {
  box-shadow: 0 0 18px rgba(92,255,148,.15), 0 12px 24px rgba(0,0,0,.22);
}

.table.lose .card {
  box-shadow: 0 0 18px rgba(255,91,91,.10), 0 12px 24px rgba(0,0,0,.22);
}


.brand {
  display: grid;
  gap: 6px;
  align-content: start;
}

.logo {
  width: 290px;
  max-width: 62vw;
  height: auto;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 10px 22px rgba(0,0,0,.38));
}

.brand-tagline {
  margin-left: 2px;
  letter-spacing: .12em;
}

.top-bar {
  gap: 14px;
}

@media (max-width: 380px) {
  .logo {
  width: 290px;
  max-width: 62vw;
  height: auto;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 10px 22px rgba(0,0,0,.38));
}

  .bank {
    padding: 9px 12px;
  }
}


.top-bar {
  align-items: center;
}

.brand {
  gap: 8px;
}

@media (max-width: 430px) {
  .logo {
    width: 240px;
    max-width: 60vw;
  }
}

@media (max-width: 380px) {
  .logo {
    width: 210px;
  }
}


.brand {
  justify-items: start;
}

.brand-tagline {
  width: 100%;
  text-align: center;
  margin-left: 0;
  font-size: 10px;
  letter-spacing: .24em;
  color: rgba(245,245,242,.72);
}

.top-bar {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: start;
}

.menu-btn {
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border-radius: 15px;
  display: grid;
  place-items: center;
  gap: 0;
  background: rgba(255,255,255,.07);
  border: 1px solid var(--line);
  margin-top: 2px;
}

.menu-btn span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 99px;
  margin: 2px 0;
}

.settings-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.48);
  backdrop-filter: blur(4px);
  z-index: 20;
}

.settings-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: min(360px, 88vw);
  height: 100vh;
  background: rgba(17,20,26,.97);
  border-left: 1px solid var(--line);
  box-shadow: -20px 0 80px rgba(0,0,0,.45);
  z-index: 21;
  padding: 22px;
  transform: translateX(105%);
  transition: transform .22s ease;
  display: grid;
  align-content: start;
  gap: 18px;
}

.settings-panel.open {
  transform: translateX(0);
}

.settings-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 14px;
}

.settings-header h3 {
  margin: 0;
  font-size: 24px;
  letter-spacing: -.04em;
}

.close-btn {
  width: 42px;
  min-height: 42px;
  border-radius: 14px;
  font-size: 28px;
  line-height: 1;
  background: rgba(255,255,255,.07);
}

.setting-row,
.setting-block {
  background: rgba(255,255,255,.055);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 16px;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.setting-row strong,
.setting-block strong {
  display: block;
  font-size: 15px;
}

.setting-row p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.toggle {
  min-height: 38px;
  width: 72px;
  border-radius: 999px;
  background: #363b46;
  color: var(--muted);
}

.toggle.is-on {
  background: var(--accent);
  color: #111;
}

.currency-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.currency-option {
  min-height: 44px;
  border-radius: 14px;
  font-size: 13px;
  background: #252a35;
  color: var(--text);
}

.currency-option.is-selected {
  background: var(--accent);
  color: #111;
}

@media (max-width: 430px) {
  .top-bar {
    grid-template-columns: 1fr auto;
  }

  .bank {
    grid-column: 2;
    grid-row: 2;
    margin-top: 8px;
  }

  .menu-btn {
    grid-column: 2;
    grid-row: 1;
  }

  .brand {
    grid-column: 1;
    grid-row: 1 / span 2;
  }

  .brand-tagline {
    max-width: 240px;
  }
}

@media (max-width: 380px) {
  .brand-tagline {
    max-width: 210px;
    font-size: 9px;
    letter-spacing: .2em;
  }
}


/* V9 fixed header and settings overrides */
.top-bar {
  display: grid !important;
  grid-template-columns: 48px 1fr auto !important;
  align-items: start !important;
  gap: 12px !important;
}

.menu-btn {
  grid-column: 1 !important;
  grid-row: 1 !important;
  margin-top: 4px !important;
  justify-self: start !important;
}

.brand {
  grid-column: 2 !important;
  grid-row: 1 / span 2 !important;
  justify-items: center !important;
  width: 100% !important;
  min-width: 0 !important;
}

.logo {
  width: 260px !important;
  max-width: 100% !important;
}

.brand-tagline {
  width: 100% !important;
  text-align: center !important;
  margin-left: 0 !important;
  font-size: 10px !important;
  letter-spacing: .22em !important;
}

.bank {
  grid-column: 3 !important;
  grid-row: 1 !important;
  justify-self: end !important;
  margin-top: 4px !important;
}

.currency-grid {
  grid-template-columns: 1fr !important;
}

@media (max-width: 430px) {
  .top-bar {
    grid-template-columns: 48px 1fr auto !important;
    gap: 10px !important;
  }

  .logo {
    width: 210px !important;
  }

  .bank {
    padding: 8px 10px !important;
  }

  .bank strong {
    font-size: 17px !important;
  }

  .brand-tagline {
    font-size: 9px !important;
    letter-spacing: .18em !important;
  }
}

@media (max-width: 380px) {
  .top-bar {
    grid-template-columns: 44px 1fr !important;
  }

  .bank {
    grid-column: 2 !important;
    grid-row: 2 !important;
    margin-top: 8px !important;
  }

  .logo {
    width: 190px !important;
  }
}


/* V10 splash screen */
.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    radial-gradient(circle at 50% 32%, rgba(255,255,255,.07), transparent 28%),
    radial-gradient(circle at 50% 74%, rgba(217,255,106,.08), transparent 26%),
    linear-gradient(145deg, #020305, #090b10 48%, #020305);
  transition: opacity .34s ease, visibility .34s ease;
}

.splash-screen.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-inner {
  width: min(420px, 100%);
  min-height: 72vh;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 22px;
  text-align: center;
}

.splash-logo {
  width: min(360px, 86vw);
  height: auto;
  display: block;
  filter: drop-shadow(0 26px 44px rgba(0,0,0,.52));
}

.splash-tagline {
  margin: -6px 0 18px;
  color: rgba(245,245,242,.72);
  font-size: 11px;
  letter-spacing: .26em;
  text-transform: uppercase;
}

.play-btn {
  min-width: 190px;
  min-height: 56px;
  padding: 0 34px;
  border-radius: 999px;
  background: #f5f5f2;
  color: #050608;
  border: 1px solid rgba(255,255,255,.22);
  font-size: 15px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .18em;
  box-shadow: 0 18px 48px rgba(0,0,0,.42), inset 0 -2px 0 rgba(0,0,0,.12);
}

.play-btn:active {
  transform: scale(.98);
}

.app-hidden {
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
}

.app-ready {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  transition: opacity .34s ease, transform .34s ease;
}

@media (max-width: 430px) {
  .splash-inner {
    min-height: 76vh;
  }

  .splash-logo {
    width: min(330px, 88vw);
  }
}


/* V12 anti-zoom without breaking dark layout */
html,
body {
  min-height: 100%;
  touch-action: manipulation;
  overscroll-behavior: none;
  -webkit-text-size-adjust: 100%;
  background:
    radial-gradient(circle at top left, rgba(217,255,106,.18), transparent 34%),
    linear-gradient(145deg, #07080b, #11141a) !important;
}

button,
a,
.card,
.round,
.primary {
  touch-action: manipulation;
}

* {
  -webkit-tap-highlight-color: transparent;
}


/* V13 PWA fullscreen and safe-area cleanup */
html,
body {
  margin: 0 !important;
  padding: 0 !important;
  width: 100%;
  min-height: 100%;
  background: #07080b !important;
}

body {
  background:
    radial-gradient(circle at top left, rgba(217,255,106,.18), transparent 34%),
    linear-gradient(145deg, #07080b, #11141a) !important;
}

.app {
  min-height: 100svh;
  padding-top: max(18px, env(safe-area-inset-top));
  padding-bottom: max(18px, env(safe-area-inset-bottom));
}

/* Prevent iOS Safari text-selection/gesture artefacts on game controls */
button,
.card,
.controls,
.table {
  -webkit-user-select: none;
  user-select: none;
}

/* Removes any accidental white overscroll flash */
.splash-screen {
  background:
    radial-gradient(circle at 50% 32%, rgba(255,255,255,.07), transparent 28%),
    radial-gradient(circle at 50% 74%, rgba(217,255,106,.08), transparent 26%),
    linear-gradient(145deg, #020305, #090b10 48%, #020305) !important;
}


/* V14 app icon, haptics, chip betting UI and dealer animations */
.chip-stack {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px;
}

.chip {
  min-height: 46px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 50%, rgba(255,255,255,.12), transparent 42%),
    #202531;
  border: 1px solid rgba(255,255,255,.13);
  color: var(--text);
  font-size: 13px;
  letter-spacing: .03em;
  box-shadow: inset 0 -2px 0 rgba(0,0,0,.2), 0 10px 20px rgba(0,0,0,.18);
}

.chip::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 5px;
  background: var(--accent);
  vertical-align: 1px;
}

.chip-clear::before {
  background: var(--muted);
}

.chip:disabled {
  opacity: .35;
}

.chip:active {
  transform: translateY(1px) scale(.98);
}

.card.dealer-draw {
  animation: dealerDraw .42s cubic-bezier(.2,.8,.2,1) both;
}

.card.reveal {
  animation: revealCard .46s cubic-bezier(.2,.8,.2,1) both;
  transform-origin: center;
}

@keyframes dealerDraw {
  0% {
    opacity: 0;
    transform: translateX(24px) translateY(-16px) scale(.9) rotate(7deg);
  }
  68% {
    opacity: 1;
    transform: translateX(-2px) translateY(2px) scale(1.02) rotate(-1deg);
  }
  100% {
    opacity: 1;
    transform: translateX(0) translateY(0) scale(1) rotate(0deg);
  }
}

@keyframes revealCard {
  0% {
    transform: rotateY(90deg) scale(.96);
    opacity: .4;
  }
  55% {
    transform: rotateY(-8deg) scale(1.02);
    opacity: 1;
  }
  100% {
    transform: rotateY(0deg) scale(1);
    opacity: 1;
  }
}

@media (max-width: 380px) {
  .chip-stack {
    gap: 7px;
  }

  .chip {
    min-height: 42px;
    font-size: 12px;
  }
}


/* V15 profile and particles */
.profile-panel{
  margin-top:18px;
  padding-top:14px;
  border-top:1px solid rgba(255,255,255,.08);
  display:grid;
  gap:10px;
}

.profile-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  font-size:13px;
  color:rgba(255,255,255,.72);
}

.profile-row strong{
  color:#fff;
  font-size:15px;
}

#particleLayer{
  position:fixed;
  inset:0;
  pointer-events:none;
  overflow:hidden;
  z-index:80;
}

.particle{
  position:absolute;
  width:8px;
  height:8px;
  border-radius:50%;
  background:#d9ff6a;
  box-shadow:0 0 12px rgba(217,255,106,.8);
  animation:particleFloat 1.4s ease-out forwards;
}

@keyframes particleFloat{
  0%{
    opacity:1;
    transform:translate(0,0) scale(1);
  }
  100%{
    opacity:0;
    transform:translate(var(--x),var(--y)) scale(.2);
  }
}


/* V16 fixed profile/stat panel */
.profile-panel {
  display: grid;
  gap: 10px;
}

.profile-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 24px;
  font-size: 13px;
  color: rgba(245,245,242,.72);
}

.profile-row strong {
  color: var(--text);
  font-size: 15px;
}

.reset-stats {
  margin-top: 6px;
  min-height: 42px;
  border-radius: 14px;
  font-size: 13px;
  background: #252a35;
  color: var(--text);
}

#particleLayer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 80;
}

.particle {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d9ff6a;
  box-shadow: 0 0 14px rgba(217,255,106,.75);
  animation: particleFloat 1.35s ease-out forwards;
}

@keyframes particleFloat {
  0% {
    opacity: 1;
    transform: translate(0,0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(var(--x),var(--y)) scale(.25);
  }
}


/* V17 smoother player/dealer card deal and hint prompt */
.card.dealing,
.card.dealer-draw,
.card.player-draw {
  animation: cardDealFade .46s cubic-bezier(.16,.84,.24,1) both;
  will-change: opacity, transform, filter;
}

.card.player-draw {
  animation-name: playerDealFade;
}

.card.dealer-draw {
  animation-name: dealerDealFade;
}

@keyframes cardDealFade {
  0% {
    opacity: 0;
    transform: translateY(-22px) scale(.9) rotate(-5deg);
    filter: blur(3px);
  }
  65% {
    opacity: 1;
    transform: translateY(3px) scale(1.02) rotate(1deg);
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0);
    filter: blur(0);
  }
}

@keyframes playerDealFade {
  0% {
    opacity: 0;
    transform: translateX(-18px) translateY(26px) scale(.9) rotate(-7deg);
    filter: blur(3px);
  }
  65% {
    opacity: 1;
    transform: translateX(2px) translateY(-2px) scale(1.02) rotate(1deg);
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: translateX(0) translateY(0) scale(1) rotate(0);
    filter: blur(0);
  }
}

@keyframes dealerDealFade {
  0% {
    opacity: 0;
    transform: translateX(22px) translateY(-22px) scale(.9) rotate(7deg);
    filter: blur(3px);
  }
  65% {
    opacity: 1;
    transform: translateX(-2px) translateY(2px) scale(1.02) rotate(-1deg);
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: translateX(0) translateY(0) scale(1) rotate(0);
    filter: blur(0);
  }
}

#hint.hint-prompt {
  position: relative;
  border: 1px solid rgba(255, 191, 71, .9);
  color: #ffbf47;
  box-shadow:
    0 0 0 1px rgba(255, 191, 71, .28),
    0 0 18px rgba(255, 191, 71, .26),
    inset 0 0 14px rgba(255, 191, 71, .08);
  animation: hintAmberPulse 1.45s ease-in-out infinite;
}

@keyframes hintAmberPulse {
  0%, 100% {
    box-shadow:
      0 0 0 1px rgba(255, 191, 71, .26),
      0 0 13px rgba(255, 191, 71, .18),
      inset 0 0 12px rgba(255, 191, 71, .06);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(255, 191, 71, .65),
      0 0 24px rgba(255, 191, 71, .38),
      inset 0 0 18px rgba(255, 191, 71, .12);
  }
}


/* V19 bank risk state and top-up screen */
.bank {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--line);
  cursor: pointer;
  display: grid;
  place-items: center;
  gap: 2px;
  min-width: 92px;
  min-height: 66px;
  transition: border-color .22s ease, box-shadow .22s ease, color .22s ease;
}

.bank span,
.bank strong {
  text-align: center;
  width: 100%;
}

.bank.bank-low {
  border-color: rgba(255, 191, 71, .82);
  box-shadow:
    0 0 0 1px rgba(255, 191, 71, .22),
    0 0 20px rgba(255, 191, 71, .18);
}

.bank.bank-critical {
  border-color: rgba(255, 91, 91, .9);
  box-shadow:
    0 0 0 1px rgba(255, 91, 91, .25),
    0 0 24px rgba(255, 91, 91, .22);
}

.bank.bank-empty {
  border-color: rgba(255, 91, 91, .95);
  color: #ff5b5b;
  box-shadow:
    0 0 0 1px rgba(255, 91, 91, .3),
    0 0 30px rgba(255, 91, 91, .24);
}

.bank.bank-empty strong {
  font-size: 16px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.topup-screen {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(2, 3, 5, .82);
  backdrop-filter: blur(14px);
}

.topup-screen[hidden] {
  display: none;
}

.topup-card {
  position: relative;
  width: min(390px, 100%);
  background:
    radial-gradient(circle at top, rgba(217,255,106,.08), transparent 32%),
    rgba(17,20,26,.98);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 30px;
  padding: 26px;
  box-shadow: 0 32px 90px rgba(0,0,0,.55);
  display: grid;
  gap: 16px;
}

.topup-card h2 {
  margin: 0;
  font-size: 34px;
  letter-spacing: -.06em;
  text-transform: uppercase;
}

.topup-tagline {
  margin: -8px 0 4px;
  color: var(--muted);
  font-size: 14px;
}

.topup-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 42px;
  min-height: 42px;
  border-radius: 14px;
  font-size: 28px;
  line-height: 1;
  background: rgba(255,255,255,.07);
}

.topup-options {
  display: grid;
  gap: 12px;
}

.topup-option {
  min-height: 74px;
  border-radius: 20px;
  padding: 14px 16px;
  background: #202531;
  border: 1px solid rgba(255,255,255,.1);
  color: var(--text);
  display: grid;
  align-content: center;
  text-align: left;
  gap: 4px;
}

.topup-option strong {
  font-size: 20px;
}

.topup-option span {
  color: var(--muted);
  font-size: 13px;
}

.topup-option:active {
  transform: scale(.985);
}

.topup-option:first-child {
  border-color: rgba(255, 191, 71, .28);
}

.topup-option:last-child {
  border-color: rgba(217,255,106,.28);
}


/* V23 animated particle network splash background */
.splash-screen {
  overflow: hidden;
}

.splash-particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: .52;
}

.splash-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 38%, rgba(255,255,255,.08), transparent 28%),
    linear-gradient(180deg, rgba(2,3,5,.08), rgba(2,3,5,.58));
}

.splash-inner {
  position: relative;
  z-index: 2;
}


/* V24 single-screen mobile fit */
html,
body {
  width: 100%;
  height: 100%;
  min-height: 100%;
  overflow: hidden !important;
  overscroll-behavior: none;
}

body {
  position: fixed;
  inset: 0;
  display: block;
}

.app {
  width: min(430px, 100%);
  height: 100svh;
  min-height: 0 !important;
  overflow: hidden !important;
  padding: max(10px, env(safe-area-inset-top)) 18px max(10px, env(safe-area-inset-bottom));
  gap: 10px;
  margin: 0 auto;
}

.top-bar {
  flex: 0 0 auto;
}

.logo {
  width: 220px !important;
  max-width: 58vw !important;
}

.brand-tagline {
  font-size: 9px !important;
  letter-spacing: .18em !important;
  margin-top: 2px !important;
}

.menu-btn {
  width: 46px !important;
  height: 46px !important;
  min-height: 46px !important;
  border-radius: 16px !important;
}

.bank {
  min-width: 82px !important;
  min-height: 58px !important;
  padding: 7px 10px !important;
  border-radius: 18px !important;
}

.bank span {
  font-size: 13px !important;
}

.bank strong {
  font-size: 24px !important;
}

.table {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  padding: 16px !important;
  border-radius: 28px !important;
  grid-template-rows: minmax(112px, .82fr) auto minmax(112px, .82fr) !important;
  gap: 12px !important;
}

.row {
  min-height: 0 !important;
}

.label {
  font-size: 11px !important;
  margin-bottom: 3px !important;
}

h2 {
  font-size: 34px !important;
  line-height: .95 !important;
}

.cards {
  gap: 10px !important;
  margin-top: 10px !important;
}

.card {
  width: 64px !important;
  height: 92px !important;
  border-radius: 15px !important;
  padding: 9px !important;
  font-size: 22px !important;
}

.card .suit {
  font-size: 24px !important;
}

.message {
  width: min(76%, 265px) !important;
  min-height: 34px !important;
  padding: 8px 12px !important;
  font-size: 13px !important;
}

.controls {
  flex: 0 0 auto !important;
  padding: 12px !important;
  border-radius: 26px !important;
  gap: 10px !important;
}

.bet-panel {
  grid-template-columns: 48px 1fr 48px !important;
}

button {
  min-height: 48px !important;
  border-radius: 16px !important;
  font-size: 15px !important;
}

button.round {
  width: 48px !important;
  height: 48px !important;
  min-height: 48px !important;
}

#bet {
  font-size: 28px !important;
  line-height: 1 !important;
}

.chip-stack {
  gap: 8px !important;
}

.chip {
  min-height: 38px !important;
  font-size: 12px !important;
  padding: 0 8px !important;
}

.actions {
  gap: 8px !important;
}

.actions button {
  min-height: 48px !important;
}

/* Small iPhone height handling */
@media (max-height: 760px) {
  .app {
    gap: 8px !important;
    padding-top: max(8px, env(safe-area-inset-top)) !important;
    padding-bottom: max(8px, env(safe-area-inset-bottom)) !important;
  }

  .logo {
    width: 190px !important;
  }

  .brand-tagline {
    font-size: 8px !important;
  }

  .menu-btn {
    width: 42px !important;
    height: 42px !important;
    min-height: 42px !important;
  }

  .bank {
    min-width: 76px !important;
    min-height: 52px !important;
  }

  .bank strong {
    font-size: 21px !important;
  }

  .table {
    padding: 14px !important;
    border-radius: 25px !important;
    grid-template-rows: minmax(98px, .8fr) auto minmax(98px, .8fr) !important;
    gap: 8px !important;
  }

  h2 {
    font-size: 30px !important;
  }

  .card {
    width: 58px !important;
    height: 82px !important;
    border-radius: 13px !important;
    font-size: 20px !important;
  }

  .card .suit {
    font-size: 22px !important;
  }

  .controls {
    padding: 10px !important;
    gap: 8px !important;
  }

  .chip {
    min-height: 34px !important;
    font-size: 11px !important;
  }

  button,
  .actions button {
    min-height: 44px !important;
  }

  button.round {
    width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
  }
}

/* Very small displays */
@media (max-height: 690px) {
  .logo {
    width: 170px !important;
  }

  .brand-tagline {
    display: none !important;
  }

  .table {
    grid-template-rows: minmax(86px, .74fr) auto minmax(86px, .74fr) !important;
  }

  .card {
    width: 52px !important;
    height: 74px !important;
  }

  .chip-stack {
    display: none !important;
  }
}


/* V25 tighter single-screen fit */
.app {
  height: 100svh !important;
  padding: max(8px, env(safe-area-inset-top)) 16px max(8px, env(safe-area-inset-bottom)) !important;
  gap: 7px !important;
}

.logo {
  width: 190px !important;
  max-width: 52vw !important;
}

.brand-tagline {
  font-size: 8px !important;
  letter-spacing: .16em !important;
  margin-top: 1px !important;
}

.menu-btn {
  width: 38px !important;
  height: 38px !important;
  min-height: 38px !important;
  border-radius: 13px !important;
  padding: 0 !important;
}

.menu-btn span {
  width: 18px !important;
  height: 3px !important;
  margin: 1.5px 0 !important;
  border-radius: 999px !important;
}

.bank {
  min-width: 74px !important;
  min-height: 50px !important;
  padding: 6px 8px !important;
  border-radius: 16px !important;
}

.bank span {
  font-size: 11px !important;
}

.bank strong {
  font-size: 20px !important;
}

.table {
  padding: 12px !important;
  border-radius: 24px !important;
  gap: 6px !important;
  grid-template-rows: minmax(82px, .7fr) auto minmax(82px, .7fr) !important;
}

.label {
  font-size: 10px !important;
  letter-spacing: .12em !important;
}

h2 {
  font-size: 28px !important;
}

.cards {
  margin-top: 7px !important;
  gap: 7px !important;
}

.card {
  width: 50px !important;
  height: 72px !important;
  border-radius: 12px !important;
  padding: 7px !important;
  font-size: 18px !important;
}

.card .suit {
  font-size: 20px !important;
}

.message {
  width: min(72%, 235px) !important;
  min-height: 30px !important;
  padding: 6px 10px !important;
  font-size: 12px !important;
}

.controls {
  padding: 9px !important;
  border-radius: 22px !important;
  gap: 7px !important;
}

.bet-panel {
  grid-template-columns: 40px 1fr 40px !important;
}

button.round {
  width: 40px !important;
  height: 40px !important;
  min-height: 40px !important;
}

button {
  min-height: 40px !important;
  border-radius: 14px !important;
  font-size: 14px !important;
}

#bet {
  font-size: 24px !important;
}

.chip-stack {
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 6px !important;
}

.chip {
  min-height: 30px !important;
  font-size: 10px !important;
  padding: 0 6px !important;
}

.chip::before {
  width: 5px !important;
  height: 5px !important;
  margin-right: 3px !important;
}

.actions {
  gap: 6px !important;
}

.actions button {
  min-height: 42px !important;
}

/* iPhone browser-height compression */
@media (max-height: 760px) {
  .app {
    gap: 6px !important;
    padding-top: max(6px, env(safe-area-inset-top)) !important;
    padding-bottom: max(6px, env(safe-area-inset-bottom)) !important;
  }

  .logo {
    width: 172px !important;
  }

  .menu-btn {
    width: 36px !important;
    height: 36px !important;
    min-height: 36px !important;
  }

  .bank {
    min-height: 46px !important;
    min-width: 68px !important;
  }

  .bank strong {
    font-size: 18px !important;
  }

  .table {
    padding: 10px !important;
    grid-template-rows: minmax(74px, .66fr) auto minmax(74px, .66fr) !important;
  }

  h2 {
    font-size: 25px !important;
  }

  .card {
    width: 46px !important;
    height: 66px !important;
    font-size: 17px !important;
  }

  .card .suit {
    font-size: 18px !important;
  }

  .message {
    min-height: 28px !important;
    font-size: 11px !important;
  }

  .controls {
    padding: 8px !important;
    gap: 6px !important;
  }

  .chip {
    min-height: 28px !important;
    font-size: 10px !important;
  }

  .actions button {
    min-height: 40px !important;
  }
}

@media (max-height: 690px) {
  .brand-tagline {
    display: none !important;
  }

  .chip-stack {
    display: none !important;
  }

  .table {
    grid-template-rows: minmax(66px, .62fr) auto minmax(66px, .62fr) !important;
  }

  .card {
    width: 42px !important;
    height: 60px !important;
  }
}


/* V26 full background continuation and colour themes */
html,
body {
  background: #07080b !important;
}

body {
  min-height: 100dvh !important;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(circle at top left, rgba(var(--theme-rgb), .24), transparent 38%),
    radial-gradient(circle at 80% 20%, rgba(var(--theme-rgb), .10), transparent 32%),
    linear-gradient(145deg, #07080b, #11141a 62%, #07080b) !important;
}

body::after {
  content: "";
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 28vh;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(7,8,11,0), rgba(7,8,11,.92) 70%, rgba(7,8,11,1));
}

body.theme-green {
  --theme-rgb: 112, 150, 62;
  --theme-accent: #d9ff6a;
}

body.theme-red {
  --theme-rgb: 190, 42, 58;
  --theme-accent: #ff5b5b;
}

body.theme-blue {
  --theme-rgb: 45, 110, 220;
  --theme-accent: #68a9ff;
}

body.theme-purple {
  --theme-rgb: 132, 80, 210;
  --theme-accent: #b58cff;
}

body.theme-orange {
  --theme-rgb: 224, 118, 38;
  --theme-accent: #ffad55;
}

body.theme-red,
body.theme-blue,
body.theme-purple,
body.theme-green,
body.theme-orange {
  background:
    radial-gradient(circle at top left, rgba(var(--theme-rgb), .24), transparent 38%),
    radial-gradient(circle at 80% 20%, rgba(var(--theme-rgb), .10), transparent 32%),
    linear-gradient(145deg, #07080b, #11141a 62%, #07080b) !important;
}

body.theme-red .primary,
body.theme-red .play-btn {
  background: var(--theme-accent) !important;
}

body.theme-blue .primary,
body.theme-blue .play-btn {
  background: var(--theme-accent) !important;
}

body.theme-purple .primary,
body.theme-purple .play-btn {
  background: var(--theme-accent) !important;
}

body.theme-orange .primary,
body.theme-orange .play-btn {
  background: var(--theme-accent) !important;
}

body.theme-green .primary,
body.theme-green .play-btn {
  background: var(--accent) !important;
}

body.theme-red .chip::before,
body.theme-blue .chip::before,
body.theme-purple .chip::before,
body.theme-orange .chip::before {
  background: var(--theme-accent) !important;
}

body.theme-red #hint.hint-prompt,
body.theme-blue #hint.hint-prompt,
body.theme-purple #hint.hint-prompt,
body.theme-orange #hint.hint-prompt {
  border-color: rgba(var(--theme-rgb), .95) !important;
  color: var(--theme-accent) !important;
  box-shadow:
    0 0 0 1px rgba(var(--theme-rgb), .28),
    0 0 18px rgba(var(--theme-rgb), .28),
    inset 0 0 14px rgba(var(--theme-rgb), .10) !important;
}

.theme-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
  margin-top: 12px;
}

.theme-option {
  min-height: 42px;
  border-radius: 14px;
  background: #252a35;
  color: var(--text);
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  align-items: center;
  text-align: left;
  padding: 0 12px;
  font-size: 13px;
}

.theme-option span {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  display: block;
  box-shadow: 0 0 14px currentColor;
}

.theme-option.is-selected {
  background: var(--accent);
  color: #111;
}







/* Keep the app visually filling the full device height */
.app {
  min-height: 100dvh !important;
  height: 100dvh !important;
}

@supports (height: 100svh) {
  .app {
    min-height: 100svh !important;
    height: 100svh !important;
  }
}


/* V27 corrected theme selector colour icons */
.theme-option {
  grid-template-columns: 22px 1fr !important;
}

.theme-option span {
  width: 16px !important;
  height: 16px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(255,255,255,.35);
  box-shadow: 0 0 14px currentColor !important;
}

.theme-option

.theme-option

.theme-option

.theme-option

.theme-option

.theme-option.is-selected {
  background: rgba(255,255,255,.08) !important;
  color: var(--text) !important;
  border: 1px solid var(--theme-accent, #d9ff6a) !important;
  box-shadow:
    0 0 0 1px rgba(var(--theme-rgb), .18),
    0 0 18px rgba(var(--theme-rgb), .20) !important;
}



body.theme-red .theme-option.is-selected {
  --theme-rgb: 190, 42, 58;
  --theme-accent: #ff5b5b;
}

body.theme-blue .theme-option.is-selected {
  --theme-rgb: 45, 110, 220;
  --theme-accent: #68a9ff;
}

body.theme-purple .theme-option.is-selected {
  --theme-rgb: 132, 80, 210;
  --theme-accent: #b58cff;
}

body.theme-green .theme-option.is-selected {
  --theme-rgb: 112, 150, 62;
  --theme-accent: #d9ff6a;
}

body.theme-orange .theme-option.is-selected {
  --theme-rgb: 224, 118, 38;
  --theme-accent: #ffad55;
}

/* Make the table and controls pick up the selected colour more clearly */
body.theme-red .table,
body.theme-red .controls,
body.theme-red .settings-panel .setting-block {
  border-color: rgba(255,91,91,.20) !important;
}

body.theme-blue .table,
body.theme-blue .controls,
body.theme-blue .settings-panel .setting-block {
  border-color: rgba(104,169,255,.20) !important;
}

body.theme-purple .table,
body.theme-purple .controls,
body.theme-purple .settings-panel .setting-block {
  border-color: rgba(181,140,255,.20) !important;
}

body.theme-green .table,
body.theme-green .controls,
body.theme-green .settings-panel .setting-block {
  border-color: rgba(217,255,106,.18) !important;
}

body.theme-orange .table,
body.theme-orange .controls,
body.theme-orange .settings-panel .setting-block {
  border-color: rgba(255,173,85,.20) !important;
}


/* V28 theme fix: scoped swatches only, preserve cards/bank/menu */
:root {
  --active-rgb: 112, 150, 62;
  --active-accent: #d9ff6a;
}

body.theme-red {
  --active-rgb: 190, 42, 58;
  --active-accent: #ff5b5b;
}

body.theme-blue {
  --active-rgb: 45, 110, 220;
  --active-accent: #68a9ff;
}

body.theme-purple {
  --active-rgb: 132, 80, 210;
  --active-accent: #b58cff;
}

body.theme-green {
  --active-rgb: 112, 150, 62;
  --active-accent: #d9ff6a;
}

body.theme-orange {
  --active-rgb: 224, 118, 38;
  --active-accent: #ffad55;
}

/* Restore card text and suits */
.card span {
  width: auto !important;
  height: auto !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  color: inherit !important;
  display: inline !important;
}

.card .suit {
  display: block !important;
}

/* Restore bank text */
.bank span,
.bank strong {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  color: inherit !important;
}

.bank {
  border-color: rgba(var(--active-rgb), .28) !important;
}

.bank strong {
  color: #f5f5f2 !important;
}

/* Hamburger remains white */
.menu-btn span {
  background: #f5f5f2 !important;
  color: #f5f5f2 !important;
  box-shadow: none !important;
  border: 0 !important;
}

/* Selected accent drives buttons and controls */
body.theme-red .primary,
body.theme-red .play-btn,
body.theme-red .toggle.is-on,
body.theme-red .currency-option.is-selected {
  background: #ff5b5b !important;
  color: #111 !important;
}

body.theme-blue .primary,
body.theme-blue .play-btn,
body.theme-blue .toggle.is-on,
body.theme-blue .currency-option.is-selected {
  background: #68a9ff !important;
  color: #111 !important;
}

body.theme-purple .primary,
body.theme-purple .play-btn,
body.theme-purple .toggle.is-on,
body.theme-purple .currency-option.is-selected {
  background: #b58cff !important;
  color: #111 !important;
}

body.theme-green .primary,
body.theme-green .play-btn,
body.theme-green .toggle.is-on,
body.theme-green .currency-option.is-selected {
  background: #d9ff6a !important;
  color: #111 !important;
}

body.theme-orange .primary,
body.theme-orange .play-btn,
body.theme-orange .toggle.is-on,
body.theme-orange .currency-option.is-selected {
  background: #ffad55 !important;
  color: #111 !important;
}

/* Chip dots use active colour */
.chip::before {
  background: var(--active-accent) !important;
  color: var(--active-accent) !important;
}

/* Theme selector rows */
.theme-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
  margin-top: 12px;
}

.theme-option {
  min-height: 42px !important;
  border-radius: 14px !important;
  background: #252a35 !important;
  color: var(--text) !important;
  display: grid !important;
  grid-template-columns: 22px 1fr !important;
  gap: 10px !important;
  align-items: center !important;
  text-align: left !important;
  padding: 0 12px !important;
  font-size: 13px !important;
  border: 1px solid transparent !important;
  box-shadow: none !important;
}

.theme-option > span {
  width: 16px !important;
  height: 16px !important;
  border-radius: 999px !important;
  display: block !important;
  border: 1px solid rgba(255,255,255,.38) !important;
  box-shadow: 0 0 14px currentColor !important;
}

.theme-option.theme-red > span {
  background: #ff5b5b !important;
  color: #ff5b5b !important;
}

.theme-option.theme-blue > span {
  background: #68a9ff !important;
  color: #68a9ff !important;
}

.theme-option.theme-purple > span {
  background: #b58cff !important;
  color: #b58cff !important;
}

.theme-option.theme-green > span {
  background: #d9ff6a !important;
  color: #d9ff6a !important;
}

.theme-option.theme-orange > span {
  background: #ffad55 !important;
  color: #ffad55 !important;
}

.theme-option.is-selected {
  border-color: var(--active-accent) !important;
  box-shadow:
    0 0 0 1px rgba(var(--active-rgb), .18),
    0 0 16px rgba(var(--active-rgb), .18) !important;
  background: rgba(255,255,255,.055) !important;
  color: var(--text) !important;
}

/* Active theme border and screen accents */
.table,
.controls,
.settings-panel .setting-block {
  border-color: rgba(var(--active-rgb), .20) !important;
}

#hint.hint-prompt {
  border-color: rgba(var(--active-rgb), .95) !important;
  color: var(--active-accent) !important;
  box-shadow:
    0 0 0 1px rgba(var(--active-rgb), .28),
    0 0 18px rgba(var(--active-rgb), .28),
    inset 0 0 14px rgba(var(--active-rgb), .10) !important;
}

/* Card back should stay monochrome */
.card.back {
  color: transparent !important;
}


/* V29 theme selection and main particle background */
.app-particles {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  opacity: .28;
}

.app {
  position: relative;
  z-index: 1;
}

.theme-option {
  cursor: pointer !important;
  pointer-events: auto !important;
  touch-action: manipulation !important;
}

.theme-option * {
  pointer-events: none !important;
}

body.theme-red {
  --active-rgb: 190, 42, 58;
  --active-accent: #ff5b5b;
}

body.theme-blue {
  --active-rgb: 45, 110, 220;
  --active-accent: #68a9ff;
}

body.theme-purple {
  --active-rgb: 132, 80, 210;
  --active-accent: #b58cff;
}

body.theme-green {
  --active-rgb: 112, 150, 62;
  --active-accent: #d9ff6a;
}

body.theme-orange {
  --active-rgb: 224, 118, 38;
  --active-accent: #ffad55;
}

/* Main selected accent colour across gameplay UI */
.primary,
.play-btn,
.toggle.is-on,
.currency-option.is-selected {
  background: var(--active-accent) !important;
  color: #111 !important;
}

.menu-btn {
  border-color: rgba(var(--active-rgb), .22) !important;
}

.bank,
.table,
.controls {
  border-color: rgba(var(--active-rgb), .26) !important;
  box-shadow:
    0 20px 55px rgba(0,0,0,.30),
    0 0 0 1px rgba(var(--active-rgb), .06) !important;
}

.settings-panel .setting-block {
  border-color: rgba(var(--active-rgb), .22) !important;
}

.chip::before,
.chip-clear::before {
  background: var(--active-accent) !important;
}

.theme-option.is-selected {
  border-color: var(--active-accent) !important;
  box-shadow:
    0 0 0 1px rgba(var(--active-rgb), .20),
    0 0 18px rgba(var(--active-rgb), .20) !important;
}

.theme-option.is-selected > span {
  box-shadow: 0 0 18px var(--active-accent) !important;
}

body.theme-red .splash-particles,
body.theme-blue .splash-particles,
body.theme-purple .splash-particles,
body.theme-green .splash-particles,
body.theme-orange .splash-particles {
  opacity: .52;
}


/* V30 collapsible settings */
.settings-panel {
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  padding-bottom: max(28px, env(safe-area-inset-bottom)) !important;
}

.collapsible-setting {
  padding: 0 !important;
  overflow: hidden;
}

.setting-collapse {
  width: 100%;
  min-height: 58px !important;
  padding: 0 16px !important;
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 22px !important;
  background: transparent !important;
  color: var(--text) !important;
  text-align: left;
}

.setting-collapse strong {
  font-size: 15px;
}

.collapse-icon {
  width: 30px !important;
  height: 30px !important;
  border-radius: 999px !important;
  display: grid !important;
  place-items: center;
  background: rgba(255,255,255,.07) !important;
  color: var(--active-accent, #d9ff6a) !important;
  font-size: 20px !important;
  font-weight: 900;
  line-height: 1;
  border: 1px solid rgba(var(--active-rgb), .22) !important;
  box-shadow: none !important;
}

.collapse-panel {
  padding: 0 16px 16px;
}

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

.collapse-panel .currency-grid,
.collapse-panel .theme-grid {
  margin-top: 0 !important;
}

.profile-panel {
  margin-bottom: 18px !important;
}


/* V31 hint readability and visible play-screen particles */
.app-particles {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 0 !important;
  pointer-events: none !important;
  opacity: .36 !important;
  mix-blend-mode: screen;
}

body::before,
body::after {
  z-index: -1 !important;
}

.app {
  position: relative !important;
  z-index: 1 !important;
}

.table,
.controls,
.top-bar,
.settings-panel {
  position: relative;
  z-index: 2;
}

.table {
  background:
    radial-gradient(circle at 15% 8%, rgba(var(--active-rgb), .035), transparent 26%),
    rgba(17,20,26,.76) !important;
  backdrop-filter: blur(2px);
}

.controls {
  background: rgba(17,20,26,.78) !important;
  backdrop-filter: blur(2px);
}

.message {
  white-space: nowrap;
  font-size: 11px !important;
  letter-spacing: .03em;
}


/* V33 fixed settings panel + splash word animation */
.settings-overlay {
  z-index: 98 !important;
}

.settings-panel {
  z-index: 99 !important;
  pointer-events: auto !important;
}

.settings-panel.open {
  transform: translateX(0) !important;
}

.splash-tagline {
  display: flex !important;
  justify-content: center;
  align-items: center;
  gap: 9px;
  text-transform: uppercase;
}

.splash-word {
  opacity: 0;
  transform: translateY(8px);
  filter: blur(5px);
  animation: splashWordFadeIn .42s ease forwards;
}

.splash-word.word-1 {
  animation-delay: .05s;
}

.splash-word.word-2 {
  animation-delay: .32s;
}

.splash-word.word-3 {
  animation-delay: .59s;
}

@keyframes splashWordFadeIn {
  0% {
    opacity: 0;
    transform: translateY(8px);
    filter: blur(5px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

.play-btn {
  background: #ffffff !important;
  color: #050608 !important;
  border: 1px solid rgba(255,255,255,.9) !important;
  box-shadow:
    0 0 0 0 rgba(255,255,255,.38),
    0 16px 44px rgba(255,255,255,.10) !important;
  animation: playWhitePulse 2.4s ease-in-out infinite !important;
}

@keyframes playWhitePulse {
  0% {
    box-shadow:
      0 0 0 0 rgba(255,255,255,.35),
      0 16px 44px rgba(255,255,255,.10);
  }

  65% {
    box-shadow:
      0 0 0 16px rgba(255,255,255,0),
      0 16px 44px rgba(255,255,255,.18);
  }

  100% {
    box-shadow:
      0 0 0 0 rgba(255,255,255,0),
      0 16px 44px rgba(255,255,255,.10);
  }
}


/* V34 hard fix: settings panel visibility + white splash play button */
.splash-screen .play-btn,
body.theme-red .splash-screen .play-btn,
body.theme-blue .splash-screen .play-btn,
body.theme-purple .splash-screen .play-btn,
body.theme-green .splash-screen .play-btn,
body.theme-orange .splash-screen .play-btn {
  background: #ffffff !important;
  color: #050608 !important;
  border: 1px solid rgba(255,255,255,.92) !important;
  box-shadow:
    0 0 0 0 rgba(255,255,255,.36),
    0 16px 44px rgba(255,255,255,.12) !important;
  animation: playWhitePulse 2.4s ease-in-out infinite !important;
}

@keyframes playWhitePulse {
  0% {
    box-shadow:
      0 0 0 0 rgba(255,255,255,.36),
      0 16px 44px rgba(255,255,255,.12);
  }

  65% {
    box-shadow:
      0 0 0 16px rgba(255,255,255,0),
      0 16px 44px rgba(255,255,255,.18);
  }

  100% {
    box-shadow:
      0 0 0 0 rgba(255,255,255,0),
      0 16px 44px rgba(255,255,255,.12);
  }
}

.settings-overlay {
  position: fixed !important;
  inset: 0 !important;
  z-index: 900 !important;
  background: rgba(0,0,0,.55) !important;
  backdrop-filter: blur(8px) !important;
}

.settings-overlay[hidden] {
  display: none !important;
}

.settings-panel {
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  left: auto !important;
  bottom: auto !important;
  width: min(360px, 88vw) !important;
  height: 100dvh !important;
  z-index: 901 !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transform: translateX(110%) !important;
  transition: transform .24s ease !important;
  background: rgba(17,20,26,.98) !important;
  border-left: 1px solid rgba(255,255,255,.13) !important;
  box-shadow: -24px 0 90px rgba(0,0,0,.62) !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
}

.settings-panel.open {
  transform: translateX(0) !important;
}

.settings-panel * {
  visibility: visible !important;
}

body.settings-open {
  overflow: hidden !important;
}


/* V35 fix collapsed settings click behaviour */
.setting-collapse {
  cursor: pointer !important;
  pointer-events: auto !important;
  touch-action: manipulation !important;
}

.setting-collapse * {
  pointer-events: none !important;
}

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

.collapse-panel:not([hidden]) {
  display: block !important;
}


/* V36 settings expanded options fix */
.collapsible-setting {
  overflow: visible !important;
}

.setting-collapse {
  cursor: pointer !important;
  pointer-events: auto !important;
}

.setting-collapse * {
  pointer-events: none !important;
}

.collapse-panel {
  padding: 0 16px 16px !important;
  margin-top: -2px !important;
  display: block !important;
}

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

.currency-grid,
.theme-grid {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 10px !important;
  margin-top: 8px !important;
}

.currency-option,
.theme-option {
  width: 100% !important;
  min-height: 42px !important;
  display: grid !important;
  align-items: center !important;
  cursor: pointer !important;
  pointer-events: auto !important;
}

.currency-option {
  justify-content: center !important;
}

.theme-option {
  grid-template-columns: 22px 1fr !important;
  justify-content: start !important;
}

.theme-option > span {
  pointer-events: none !important;
}


/* V38 logo, win/lose pulse and social share footer */
.logo {
  width: 230px !important;
  max-width: 62vw !important;
}

@media (max-height: 760px) {
  .logo {
    width: 205px !important;
  }
}

@media (max-height: 690px) {
  .logo {
    width: 185px !important;
  }
}

.table.win-pulse,
.controls.win-pulse {
  animation: resultPulseWin 1.15s ease-in-out 2;
  border-color: rgba(63, 230, 128, .86) !important;
  box-shadow:
    0 0 0 1px rgba(63, 230, 128, .26),
    0 0 26px rgba(63, 230, 128, .26),
    inset 0 0 24px rgba(63, 230, 128, .055) !important;
}

.table.lose-pulse,
.controls.lose-pulse {
  animation: resultPulseLose 1.15s ease-in-out 2;
  border-color: rgba(255, 72, 72, .88) !important;
  box-shadow:
    0 0 0 1px rgba(255, 72, 72, .26),
    0 0 26px rgba(255, 72, 72, .24),
    inset 0 0 24px rgba(255, 72, 72, .055) !important;
}

@keyframes resultPulseWin {
  0%, 100% {
    box-shadow:
      0 0 0 1px rgba(63, 230, 128, .14),
      0 0 14px rgba(63, 230, 128, .10),
      inset 0 0 12px rgba(63, 230, 128, .03);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(63, 230, 128, .48),
      0 0 34px rgba(63, 230, 128, .36),
      inset 0 0 32px rgba(63, 230, 128, .08);
  }
}

@keyframes resultPulseLose {
  0%, 100% {
    box-shadow:
      0 0 0 1px rgba(255, 72, 72, .14),
      0 0 14px rgba(255, 72, 72, .10),
      inset 0 0 12px rgba(255, 72, 72, .03);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(255, 72, 72, .50),
      0 0 34px rgba(255, 72, 72, .34),
      inset 0 0 32px rgba(255, 72, 72, .08);
  }
}

.share-section {
  flex: 0 0 auto;
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 6px 0 2px;
}

.share-section p {
  margin: 0;
  color: rgba(245,245,242,.62);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.share-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.share-btn {
  width: 38px !important;
  height: 38px !important;
  min-height: 38px !important;
  border-radius: 999px !important;
  background: rgba(255,255,255,.035) !important;
  border: 1px solid rgba(245,245,242,.24) !important;
  color: rgba(245,245,242,.86) !important;
  display: grid !important;
  place-items: center !important;
  padding: 0 !important;
}

.share-btn svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.share-btn:first-child svg {
  fill: currentColor;
  stroke: none;
}

.share-btn:active {
  transform: scale(.96);
}

@media (max-height: 760px) {
  .share-section {
    gap: 6px;
    padding-top: 3px;
  }

  .share-section p {
    font-size: 8px;
  }

  .share-btn {
    width: 34px !important;
    height: 34px !important;
    min-height: 34px !important;
  }

  .share-btn svg {
    width: 15px;
    height: 15px;
  }
}

@media (max-height: 690px) {
  .share-section {
    display: none !important;
  }
}


/* V39 top layout and stronger result pulse */
.top-bar {
  display: grid !important;
  grid-template-columns: 1fr auto !important;
  align-items: start !important;
  gap: 12px !important;
}

.brand {
  grid-column: 1 !important;
  grid-row: 1 !important;
  justify-items: start !important;
  align-items: start !important;
  width: 100% !important;
  min-width: 0 !important;
}

.logo {
  width: 255px !important;
  max-width: 56vw !important;
  margin: 0 !important;
}

.brand-tagline {
  width: auto !important;
  max-width: none !important;
  text-align: left !important;
  margin: 3px 0 0 1px !important;
  font-size: 10px !important;
  letter-spacing: .18em !important;
}

.top-actions {
  grid-column: 2 !important;
  grid-row: 1 !important;
  display: flex !important;
  align-items: start !important;
  justify-content: end !important;
  gap: 9px !important;
}

.menu-btn {
  position: relative !important;
  grid-column: auto !important;
  grid-row: auto !important;
  margin: 0 !important;
  justify-self: auto !important;
  width: 42px !important;
  height: 42px !important;
  min-height: 42px !important;
  border-radius: 15px !important;
  flex: 0 0 42px !important;
}

.menu-btn span {
  width: 18px !important;
  height: 3px !important;
  margin: 1.5px 0 !important;
  background: #f5f5f2 !important;
}

.bank {
  grid-column: auto !important;
  grid-row: auto !important;
  justify-self: auto !important;
  margin: 0 !important;
  min-width: 86px !important;
  min-height: 58px !important;
  flex: 0 0 auto !important;
}

.bank strong {
  font-size: 24px !important;
}

.bank.bank-empty strong {
  font-size: 18px !important;
}

/* Override older result styles and force visible pulse */
.table.win,
.table.win-pulse,
.controls.win-pulse {
  border-color: rgba(63, 230, 128, .92) !important;
  box-shadow:
    0 0 0 1px rgba(63, 230, 128, .36),
    0 0 32px rgba(63, 230, 128, .32),
    inset 0 0 32px rgba(63, 230, 128, .07) !important;
}

.table.lose,
.table.lose-pulse,
.controls.lose-pulse {
  border-color: rgba(255, 72, 72, .94) !important;
  box-shadow:
    0 0 0 1px rgba(255, 72, 72, .36),
    0 0 32px rgba(255, 72, 72, .30),
    inset 0 0 32px rgba(255, 72, 72, .07) !important;
}

.table.win-pulse,
.controls.win-pulse {
  animation: resultPulseWinStrong 1.1s ease-in-out 2 !important;
}

.table.lose-pulse,
.controls.lose-pulse {
  animation: resultPulseLoseStrong 1.1s ease-in-out 2 !important;
}

@keyframes resultPulseWinStrong {
  0%, 100% {
    border-color: rgba(63, 230, 128, .50);
    box-shadow:
      0 0 0 1px rgba(63, 230, 128, .18),
      0 0 16px rgba(63, 230, 128, .14),
      inset 0 0 18px rgba(63, 230, 128, .04);
  }
  50% {
    border-color: rgba(63, 230, 128, 1);
    box-shadow:
      0 0 0 1px rgba(63, 230, 128, .60),
      0 0 44px rgba(63, 230, 128, .42),
      inset 0 0 38px rgba(63, 230, 128, .10);
  }
}

@keyframes resultPulseLoseStrong {
  0%, 100% {
    border-color: rgba(255, 72, 72, .52);
    box-shadow:
      0 0 0 1px rgba(255, 72, 72, .18),
      0 0 16px rgba(255, 72, 72, .14),
      inset 0 0 18px rgba(255, 72, 72, .04);
  }
  50% {
    border-color: rgba(255, 72, 72, 1);
    box-shadow:
      0 0 0 1px rgba(255, 72, 72, .60),
      0 0 44px rgba(255, 72, 72, .40),
      inset 0 0 38px rgba(255, 72, 72, .10);
  }
}

@media (max-width: 430px) {
  .top-bar {
    grid-template-columns: 1fr auto !important;
    gap: 8px !important;
  }

  .logo {
    width: 220px !important;
    max-width: 52vw !important;
  }

  .brand-tagline {
    font-size: 8px !important;
    letter-spacing: .14em !important;
  }

  .top-actions {
    gap: 7px !important;
  }

  .menu-btn {
    width: 38px !important;
    height: 38px !important;
    min-height: 38px !important;
    flex-basis: 38px !important;
  }

  .bank {
    min-width: 78px !important;
    min-height: 52px !important;
    padding: 6px 8px !important;
  }

  .bank strong {
    font-size: 20px !important;
  }

  .bank.bank-empty strong {
    font-size: 15px !important;
  }
}

@media (max-height: 760px) {
  .logo {
    width: 200px !important;
  }

  .brand-tagline {
    font-size: 7.5px !important;
  }

  .bank {
    min-width: 72px !important;
    min-height: 48px !important;
  }

  .bank strong {
    font-size: 18px !important;
  }
}


/* V40 logo/header alignment and share section bottom fit */
.top-bar {
  align-items: start !important;
}

.brand {
  justify-items: start !important;
  align-content: start !important;
  text-align: left !important;
  padding-left: 0 !important;
}

.logo {
  width: 300px !important;
  max-width: 60vw !important;
  display: block !important;
  margin: 0 !important;
}

.brand-tagline {
  text-align: left !important;
  justify-self: start !important;
  margin: 4px 0 0 2px !important;
  padding: 0 !important;
  width: auto !important;
  max-width: none !important;
  font-size: 10px !important;
  letter-spacing: .18em !important;
}

/* Use the empty bottom area by letting the share block anchor lower */
.app {
  display: flex !important;
  flex-direction: column !important;
}

.share-section {
  margin-top: auto !important;
  padding: 10px 0 max(4px, env(safe-area-inset-bottom)) !important;
}

.share-section p {
  margin-bottom: 4px !important;
}

@media (max-width: 430px) {
  .logo {
    width: 280px !important;
    max-width: 58vw !important;
  }

  .brand-tagline {
    font-size: 9px !important;
    letter-spacing: .16em !important;
    margin-top: 4px !important;
  }
}

@media (max-height: 760px) {
  .logo {
    width: 255px !important;
    max-width: 56vw !important;
  }

  .brand-tagline {
    font-size: 8px !important;
    letter-spacing: .14em !important;
  }

  .share-section {
    padding-bottom: max(2px, env(safe-area-inset-bottom)) !important;
  }
}

@media (max-height: 690px) {
  .logo {
    width: 230px !important;
    max-width: 54vw !important;
  }

  .share-section {
    display: grid !important;
  }

  .share-btn {
    width: 30px !important;
    height: 30px !important;
    min-height: 30px !important;
  }
}


/* V41 cleaner header, dot menu and slower splash word animation */
.top-bar {
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 10px !important;
  align-items: start !important;
}

.brand {
  justify-items: start !important;
  align-items: start !important;
  overflow: hidden !important;
}

.logo {
  width: 215px !important;
  max-width: 46vw !important;
  height: auto !important;
}

.brand-tagline {
  margin: 4px 0 0 1px !important;
  font-size: 9px !important;
  letter-spacing: .15em !important;
  line-height: 1.1 !important;
  white-space: nowrap !important;
}

.top-actions {
  gap: 8px !important;
  align-items: stretch !important;
}

.menu-btn {
  width: 58px !important;
  height: 58px !important;
  min-height: 58px !important;
  border-radius: 20px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  padding: 0 !important;
}

.menu-btn span {
  width: 6px !important;
  height: 6px !important;
  margin: 0 !important;
  border-radius: 999px !important;
  background: #ffffff !important;
  display: block !important;
}

.bank {
  min-width: 84px !important;
  min-height: 58px !important;
  height: 58px !important;
  border-radius: 20px !important;
}

.bank span {
  font-size: 12px !important;
}

.bank strong {
  font-size: 22px !important;
}

@media (max-width: 430px) {
  .logo {
    width: 200px !important;
    max-width: 45vw !important;
  }

  .brand-tagline {
    font-size: 8px !important;
    letter-spacing: .13em !important;
  }

  .menu-btn {
    width: 52px !important;
    height: 52px !important;
    min-height: 52px !important;
  }

  .bank {
    min-width: 78px !important;
    min-height: 52px !important;
    height: 52px !important;
  }

  .bank strong {
    font-size: 20px !important;
  }
}

@media (max-width: 380px) {
  .logo {
    width: 180px !important;
    max-width: 42vw !important;
  }

  .brand-tagline {
    font-size: 7px !important;
    letter-spacing: .11em !important;
  }

  .top-actions {
    gap: 6px !important;
  }

  .menu-btn {
    width: 48px !important;
    height: 48px !important;
    min-height: 48px !important;
  }

  .bank {
    min-width: 72px !important;
    height: 48px !important;
    min-height: 48px !important;
  }
}

/* slow splash tagline to approx 2 seconds */
.splash-word {
  animation-duration: .8s !important;
}

.splash-word.word-1 {
  animation-delay: .18s !important;
}

.splash-word.word-2 {
  animation-delay: .75s !important;
}

.splash-word.word-3 {
  animation-delay: 1.32s !important;
}

/* V41 confetti */
.confetti-piece {
  position: fixed;
  top: -16px;
  width: 7px;
  height: 12px;
  pointer-events: none;
  z-index: 120;
  opacity: .95;
  animation: confettiFall 1.9s linear forwards;
}

.confetti-green {
  background: #3fe680;
  box-shadow: 0 0 12px rgba(63,230,128,.65);
}

@keyframes confettiFall {
  0% {
    transform: translate3d(0, -20px, 0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translate3d(var(--drift), 110vh, 0) rotate(680deg);
    opacity: 0;
  }
}


/* V42 header placement refinement */
.top-bar {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto auto !important;
  align-items: start !important;
  column-gap: 10px !important;
  width: 100% !important;
}

.brand {
  grid-column: 1 !important;
  grid-row: 1 !important;
  justify-self: start !important;
  justify-items: start !important;
  align-items: start !important;
  text-align: left !important;
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: visible !important;
  padding: 0 !important;
  margin: 0 !important;
}

.logo {
  width: clamp(245px, 48vw, 320px) !important;
  max-width: 100% !important;
  display: block !important;
  margin: 0 !important;
}

.brand-tagline {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 5px 0 0 2px !important;
  text-align: left !important;
  justify-self: start !important;
  font-size: clamp(8px, 1.8vw, 11px) !important;
  letter-spacing: .18em !important;
  line-height: 1.1 !important;
  white-space: nowrap !important;
  background: transparent !important;
}

.top-actions {
  grid-column: 2 / 4 !important;
  grid-row: 1 !important;
  justify-self: end !important;
  display: flex !important;
  align-items: start !important;
  gap: 10px !important;
  margin: 0 !important;
}

.menu-btn {
  width: 56px !important;
  height: 56px !important;
  min-height: 56px !important;
  flex: 0 0 56px !important;
  border-radius: 20px !important;
}

.bank {
  min-width: 92px !important;
  min-height: 56px !important;
  height: 56px !important;
  flex: 0 0 auto !important;
  border-radius: 20px !important;
}

.bank strong {
  font-size: 23px !important;
}

@media (max-width: 430px) {
  .top-bar {
    column-gap: 8px !important;
  }

  .logo {
    width: clamp(220px, 46vw, 280px) !important;
  }

  .brand-tagline {
    font-size: clamp(7px, 1.65vw, 9px) !important;
    letter-spacing: .15em !important;
  }

  .top-actions {
    gap: 7px !important;
  }

  .menu-btn {
    width: 50px !important;
    height: 50px !important;
    min-height: 50px !important;
    flex-basis: 50px !important;
  }

  .bank {
    min-width: 82px !important;
    min-height: 50px !important;
    height: 50px !important;
  }

  .bank strong {
    font-size: 20px !important;
  }
}

@media (max-width: 380px) {
  .logo {
    width: 205px !important;
  }

  .brand-tagline {
    font-size: 7px !important;
    letter-spacing: .12em !important;
  }

  .menu-btn {
    width: 46px !important;
    height: 46px !important;
    min-height: 46px !important;
    flex-basis: 46px !important;
  }

  .bank {
    min-width: 74px !important;
    min-height: 46px !important;
    height: 46px !important;
  }
}


/* V43 header logo position and collapse usability */
.top-bar {
  align-items: start !important;
  padding-top: 10px !important;
}

.brand {
  transform: translateY(12px) !important;
  display: grid !important;
  gap: 4px !important;
  justify-items: start !important;
  text-align: left !important;
}

.logo {
  width: clamp(235px, 46vw, 300px) !important;
  max-width: 100% !important;
  margin: 0 !important;
  display: block !important;
}

.brand-tagline {
  margin: 0 0 0 2px !important;
  text-align: left !important;
  justify-self: start !important;
  width: auto !important;
  font-size: clamp(8px, 1.7vw, 10px) !important;
  letter-spacing: .17em !important;
  line-height: 1.1 !important;
}

.top-actions {
  align-items: start !important;
  margin-top: 0 !important;
}

@media (max-width: 430px) {
  .brand {
    transform: translateY(10px) !important;
  }

  .logo {
    width: clamp(215px, 45vw, 260px) !important;
  }

  .brand-tagline {
    font-size: clamp(7px, 1.55vw, 8.5px) !important;
    letter-spacing: .14em !important;
  }
}

@media (max-width: 380px) {
  .brand {
    transform: translateY(8px) !important;
  }

  .logo {
    width: 200px !important;
  }
}

/* Make collapse headers always clickable after choosing options */
.collapsible-setting {
  overflow: visible !important;
}

.setting-collapse {
  position: relative !important;
  z-index: 3 !important;
  cursor: pointer !important;
  pointer-events: auto !important;
  touch-action: manipulation !important;
}

.setting-collapse * {
  pointer-events: none !important;
}

.collapse-panel {
  position: relative !important;
  z-index: 1 !important;
}

.currency-option,
.theme-option {
  touch-action: manipulation !important;
}


/* V44 collapse reliability and tagline alignment */
.setting-collapse {
  position: relative !important;
  z-index: 20 !important;
  pointer-events: auto !important;
  cursor: pointer !important;
  touch-action: manipulation !important;
}

.setting-collapse * {
  pointer-events: none !important;
}

.collapse-panel {
  position: relative !important;
  z-index: 1 !important;
  padding: 0 16px 16px !important;
}

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

.collapse-panel.is-open {
  display: block !important;
}

.currency-option,
.theme-option {
  position: relative !important;
  z-index: 2 !important;
}

/* Align SIMPLE with the N and move it closer under the logo */
.brand {
  transform: translateY(14px) !important;
  gap: 1px !important;
}

.logo {
  margin-left: 0 !important;
}

.brand-tagline {
  margin: -2px 0 0 0 !important;
  padding-left: 0 !important;
  text-align: left !important;
  justify-self: start !important;
  align-self: start !important;
  letter-spacing: .16em !important;
}

@media (max-width: 430px) {
  .brand {
    transform: translateY(12px) !important;
  }

  .brand-tagline {
    margin-top: -1px !important;
    letter-spacing: .13em !important;
  }
}

@media (max-width: 380px) {
  .brand {
    transform: translateY(10px) !important;
  }
}


/* V45 robust collapsible settings */
.collapsible-setting {
  overflow: hidden !important;
}

.setting-collapse {
  width: 100% !important;
  position: relative !important;
  z-index: 10 !important;
  pointer-events: auto !important;
  touch-action: manipulation !important;
  cursor: pointer !important;
}

.setting-collapse * {
  pointer-events: none !important;
}

.collapse-panel {
  position: relative !important;
  z-index: 1 !important;
  padding: 0 16px 16px !important;
}

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

.collapse-panel.is-open {
  display: block !important;
}

.currency-grid,
.theme-grid {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 10px !important;
}

.currency-option,
.theme-option {
  pointer-events: auto !important;
  touch-action: manipulation !important;
}

/* V45 splash split logo: JACK comes out from NOIR */
.splash-logo.split-logo {
  width: auto !important;
  height: auto !important;
  display: inline-flex !important;
  align-items: baseline !important;
  justify-content: center !important;
  gap: 0 !important;
  margin: 0 auto !important;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  font-weight: 950 !important;
  letter-spacing: -.08em !important;
  line-height: .86 !important;
  font-size: clamp(54px, 15vw, 92px) !important;
  color: #fff !important;
  text-transform: uppercase;
}

.split-noir {
  display: inline-block;
  color: #fff;
  transform: translateX(24px);
  opacity: 0;
  animation: noirIn .7s cubic-bezier(.16,.84,.24,1) forwards .08s;
}

.split-jack {
  display: inline-block;
  color: transparent;
  -webkit-text-stroke: 2px #fff;
  text-stroke: 2px #fff;
  transform: translateX(-44px);
  opacity: 0;
  animation: jackOut .9s cubic-bezier(.16,.84,.24,1) forwards .48s;
}

@keyframes noirIn {
  from {
    opacity: 0;
    transform: translateX(24px) scale(.96);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
    filter: blur(0);
  }
}

@keyframes jackOut {
  from {
    opacity: 0;
    transform: translateX(-44px);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
    filter: blur(0);
  }
}

/* Make SIMPLE REFINED PLAY fade in smoothly after logo */
.splash-word {
  animation-duration: .68s !important;
}

.splash-word.word-1 {
  animation-delay: 1.05s !important;
}

.splash-word.word-2 {
  animation-delay: 1.32s !important;
}

.splash-word.word-3 {
  animation-delay: 1.59s !important;
}

/* White/transparent play button with white pulse */
.splash-screen .play-btn,
body.theme-red .splash-screen .play-btn,
body.theme-blue .splash-screen .play-btn,
body.theme-purple .splash-screen .play-btn,
body.theme-green .splash-screen .play-btn,
body.theme-orange .splash-screen .play-btn {
  background: rgba(255,255,255,.04) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255,255,255,.88) !important;
  box-shadow:
    0 0 0 0 rgba(255,255,255,.32),
    0 16px 44px rgba(255,255,255,.10) !important;
  animation: playWhitePulse 2.4s ease-in-out infinite !important;
}

@keyframes playWhitePulse {
  0% {
    box-shadow:
      0 0 0 0 rgba(255,255,255,.34),
      0 16px 44px rgba(255,255,255,.10);
  }
  65% {
    box-shadow:
      0 0 0 15px rgba(255,255,255,0),
      0 16px 44px rgba(255,255,255,.16);
  }
  100% {
    box-shadow:
      0 0 0 0 rgba(255,255,255,0),
      0 16px 44px rgba(255,255,255,.10);
  }
}

/* Splash share options */
.splash-inner {
  min-height: min(680px, 86svh);
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 20px;
}

.splash-share {
  align-self: end;
  display: grid;
  justify-items: center;
  gap: 10px;
  margin-top: 22px;
}

.splash-share p {
  margin: 0;
  color: rgba(245,245,242,.62);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.splash-share .share-buttons {
  display: flex;
  gap: 12px;
}

.splash-share .share-btn {
  width: 38px !important;
  height: 38px !important;
  min-height: 38px !important;
  border-radius: 999px !important;
  background: rgba(255,255,255,.035) !important;
  border: 1px solid rgba(245,245,242,.24) !important;
  color: rgba(245,245,242,.86) !important;
  display: grid !important;
  place-items: center !important;
  padding: 0 !important;
}

.splash-share .share-btn svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.splash-share .share-btn:first-child svg {
  fill: currentColor;
  stroke: none;
}

/* Play to game screen opening animation */
.app.app-opening {
  animation: gameOpen .58s cubic-bezier(.16,.84,.24,1) both;
}

@keyframes gameOpen {
  from {
    opacity: 0;
    transform: translateY(18px) scale(.965);
    filter: blur(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}


/* V46 splash logo uses same artwork/font as game header */
.splash-logo.split-logo,
.split-noir,
.split-jack {
  all: unset;
}

.splash-logo-anim {
  position: relative;
  width: min(84vw, 560px);
  height: auto;
  display: grid;
  place-items: center;
  overflow: visible;
  margin: 0 auto;
}

.splash-logo-base,
.splash-logo-jack {
  width: 100%;
  height: auto;
  display: block;
}

.splash-logo-base {
  opacity: 0;
  clip-path: inset(0 43% 0 0);
  animation: splashNoirImageIn .72s cubic-bezier(.16,.84,.24,1) forwards .05s;
}

.splash-logo-jack {
  position: absolute;
  inset: 0;
  opacity: 0;
  clip-path: inset(0 0 0 43%);
  transform: translateX(-18%);
  animation: splashJackImageOut .92s cubic-bezier(.16,.84,.24,1) forwards .5s;
}

@keyframes splashNoirImageIn {
  from {
    opacity: 0;
    transform: translateX(20px) scale(.985);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
    filter: blur(0);
  }
}

@keyframes splashJackImageOut {
  from {
    opacity: 0;
    transform: translateX(-18%);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
    filter: blur(0);
  }
}

/* V46 settings: use native details/summary style behaviour driven by explicit hidden state */
.setting-collapse {
  pointer-events: auto !important;
  z-index: 50 !important;
}

.setting-collapse * {
  pointer-events: none !important;
}

.collapse-panel {
  display: block !important;
}

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

.currency-option,
.theme-option {
  pointer-events: auto !important;
  z-index: 2 !important;
}

/* Keep splash share consistent */
.splash-share .share-btn,
.share-section .share-btn {
  cursor: pointer !important;
}


/* V48 splash logo cleaned: single artwork, same as main logo */
.splash-logo-anim,
.splash-logo.split-logo,
.split-noir,
.split-jack,
.splash-logo-base,
.splash-logo-jack {
  display: none !important;
}

.splash-logo-clean-wrap {
  width: min(84vw, 560px);
  display: grid;
  place-items: center;
  overflow: visible;
  margin: 0 auto;
  opacity: 0;
  transform: translateY(10px) scale(.965);
  filter: blur(8px);
  animation: splashLogoCleanIn 1.05s cubic-bezier(.16,.84,.24,1) forwards .12s;
}

.splash-logo-clean {
  width: 100%;
  height: auto;
  display: block;
}

@keyframes splashLogoCleanIn {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(.965);
    filter: blur(8px);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

/* V48 background colour menu: make all colour options visible */
#backgroundPanel:not([hidden]),
#backgroundPanel.is-open {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

#backgroundPanel .theme-grid {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 10px !important;
  visibility: visible !important;
  opacity: 1 !important;
}

#backgroundPanel .theme-option {
  display: grid !important;
  grid-template-columns: 24px 1fr !important;
  min-height: 44px !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 0 12px !important;
  border-radius: 14px !important;
  background: #252a35 !important;
  color: #f5f5f2 !important;
  border: 1px solid rgba(255,255,255,.10) !important;
  visibility: visible !important;
  opacity: 1 !important;
}

#backgroundPanel .theme-option > span {
  display: block !important;
  width: 16px !important;
  height: 16px !important;
  border-radius: 50% !important;
  border: 1px solid rgba(255,255,255,.42) !important;
  box-shadow: 0 0 14px currentColor !important;
}

#backgroundPanel .theme-option > strong {
  display: block !important;
  color: #f5f5f2 !important;
  font-size: 13px !important;
  font-weight: 800 !important;
}

#backgroundPanel .theme-red > span {
  background: #ff5b5b !important;
  color: #ff5b5b !important;
}

#backgroundPanel .theme-blue > span {
  background: #68a9ff !important;
  color: #68a9ff !important;
}

#backgroundPanel .theme-purple > span {
  background: #b58cff !important;
  color: #b58cff !important;
}

#backgroundPanel .theme-green > span {
  background: #d9ff6a !important;
  color: #d9ff6a !important;
}

#backgroundPanel .theme-orange > span {
  background: #ffad55 !important;
  color: #ffad55 !important;
}

#backgroundPanel .theme-option.is-selected {
  border-color: var(--active-accent) !important;
  box-shadow:
    0 0 0 1px rgba(var(--active-rgb), .20),
    0 0 16px rgba(var(--active-rgb), .18) !important;
  background: rgba(255,255,255,.075) !important;
}


/* V49: hard fix visible background colours and left-aligned brand */
.top-bar {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: start !important;
  gap: 10px !important;
  padding-top: 8px !important;
}

.brand {
  justify-self: start !important;
  justify-items: start !important;
  align-items: start !important;
  text-align: left !important;
  transform: none !important;
  padding: 0 !important;
  margin: 0 !important;
  gap: 0 !important;
  width: auto !important;
  max-width: calc(100vw - 170px) !important;
}

.logo {
  display: block !important;
  width: min(255px, calc(100vw - 178px)) !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.brand-tagline {
  display: block !important;
  text-align: left !important;
  justify-self: start !important;
  align-self: start !important;
  margin: 2px 0 0 0 !important;
  padding: 0 !important;
  width: auto !important;
  max-width: none !important;
  font-size: 8px !important;
  letter-spacing: .125em !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

.top-actions {
  justify-self: end !important;
  display: flex !important;
  align-items: start !important;
  gap: 8px !important;
  margin: 0 !important;
}

@media (max-width: 430px) {
  .brand {
    max-width: calc(100vw - 162px) !important;
  }

  .logo {
    width: min(235px, calc(100vw - 170px)) !important;
  }

  .brand-tagline {
    font-size: 7px !important;
    letter-spacing: .105em !important;
  }
}

@media (max-width: 380px) {
  .brand {
    max-width: calc(100vw - 150px) !important;
  }

  .logo {
    width: min(210px, calc(100vw - 158px)) !important;
  }

  .brand-tagline {
    font-size: 6.4px !important;
    letter-spacing: .085em !important;
  }
}

/* Background colour menu must show all options */
.background-setting {
  overflow: visible !important;
}

#backgroundPanel.background-panel,
#backgroundPanel:not([hidden]) {
  display: block !important;
  max-height: none !important;
  height: auto !important;
  overflow: visible !important;
  padding: 0 16px 16px !important;
  visibility: visible !important;
  opacity: 1 !important;
}

#backgroundPanel[hidden] {
  display: none !important;
}

#backgroundPanel .theme-grid {
  display: grid !important;
  grid-template-columns: 1fr !important;
  grid-auto-rows: minmax(44px, auto) !important;
  gap: 10px !important;
  margin: 8px 0 0 0 !important;
  padding: 0 !important;
  max-height: none !important;
  height: auto !important;
  overflow: visible !important;
}

#backgroundPanel .theme-option {
  display: grid !important;
  grid-template-columns: 24px 1fr !important;
  align-items: center !important;
  justify-content: start !important;
  gap: 10px !important;
  width: 100% !important;
  min-height: 44px !important;
  height: 44px !important;
  padding: 0 12px !important;
  margin: 0 !important;
  border-radius: 14px !important;
  border: 1px solid rgba(255,255,255,.10) !important;
  background: #252a35 !important;
  color: #f5f5f2 !important;
  opacity: 1 !important;
  visibility: visible !important;
  position: relative !important;
  pointer-events: auto !important;
}

#backgroundPanel .theme-option > span {
  display: block !important;
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  min-height: 16px !important;
  border-radius: 50% !important;
  border: 1px solid rgba(255,255,255,.42) !important;
  box-shadow: 0 0 14px currentColor !important;
  background: currentColor !important;
}

#backgroundPanel .theme-option > strong {
  display: block !important;
  color: #f5f5f2 !important;
  font-size: 13px !important;
  font-weight: 800 !important;
}

#backgroundPanel .theme-red > span { color: #ff5b5b !important; }
#backgroundPanel .theme-blue > span { color: #68a9ff !important; }
#backgroundPanel .theme-purple > span { color: #b58cff !important; }
#backgroundPanel .theme-green > span { color: #d9ff6a !important; }
#backgroundPanel .theme-orange > span { color: #ffad55 !important; }

#backgroundPanel .theme-option.is-selected {
  border-color: var(--active-accent) !important;
  box-shadow:
    0 0 0 1px rgba(var(--active-rgb), .22),
    0 0 16px rgba(var(--active-rgb), .18) !important;
  background: rgba(255,255,255,.075) !important;
}

/* Stop any old rules clipping expanded panels */
.collapsible-setting,
.setting-block {
  max-height: none !important;
}

.collapse-panel:not([hidden]) {
  max-height: none !important;
  overflow: visible !important;
}


/* V50 header reset: menu left, logo centred, bank right */
.top-bar {
  display: grid !important;
  grid-template-columns: 58px 1fr 92px !important;
  align-items: start !important;
  gap: 10px !important;
  padding-top: 6px !important;
  width: 100% !important;
}

.top-bar .menu-btn {
  grid-column: 1 !important;
  justify-self: start !important;
  align-self: start !important;
  width: 52px !important;
  height: 52px !important;
  min-height: 52px !important;
  border-radius: 18px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  margin: 0 !important;
  transform: none !important;
}

.top-bar .menu-btn span {
  width: 6px !important;
  height: 6px !important;
  margin: 0 !important;
  border-radius: 999px !important;
  background: #fff !important;
}

.top-bar .brand {
  grid-column: 2 !important;
  justify-self: center !important;
  align-self: start !important;
  display: grid !important;
  justify-items: center !important;
  text-align: center !important;
  width: 100% !important;
  max-width: none !important;
  transform: none !important;
  margin: 0 !important;
  padding: 0 !important;
  gap: 2px !important;
}

.top-bar .logo {
  width: 220px !important;
  max-width: 100% !important;
  margin: 0 auto !important;
  display: block !important;
}

.top-bar .brand-tagline {
  text-align: center !important;
  justify-self: center !important;
  margin: 2px 0 0 0 !important;
  padding: 0 !important;
  width: auto !important;
  max-width: none !important;
  font-size: 8px !important;
  letter-spacing: .13em !important;
  white-space: nowrap !important;
  line-height: 1 !important;
}

.top-bar .bank {
  grid-column: 3 !important;
  justify-self: end !important;
  align-self: start !important;
  min-width: 86px !important;
  width: 86px !important;
  height: 52px !important;
  min-height: 52px !important;
  border-radius: 18px !important;
  margin: 0 !important;
  padding: 6px 8px !important;
}

.top-bar .bank span {
  font-size: 12px !important;
}

.top-bar .bank strong {
  font-size: 21px !important;
}

@media (max-width: 390px) {
  .top-bar {
    grid-template-columns: 50px 1fr 78px !important;
    gap: 8px !important;
  }

  .top-bar .menu-btn {
    width: 46px !important;
    height: 46px !important;
    min-height: 46px !important;
  }

  .top-bar .logo {
    width: 190px !important;
  }

  .top-bar .brand-tagline {
    font-size: 7px !important;
    letter-spacing: .1em !important;
  }

  .top-bar .bank {
    width: 78px !important;
    min-width: 78px !important;
    height: 46px !important;
    min-height: 46px !important;
  }

  .top-bar .bank strong {
    font-size: 18px !important;
  }
}

/* V50 settings panels rebuilt: reliable expand/collapse and visible options */
.simple-setting {
  padding: 0 !important;
  overflow: visible !important;
}

.setting-collapse {
  width: 100% !important;
  min-height: 58px !important;
  padding: 0 16px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  border-radius: 22px !important;
  background: transparent !important;
  color: var(--text) !important;
  position: relative !important;
  z-index: 5 !important;
  cursor: pointer !important;
  pointer-events: auto !important;
}

.setting-collapse * {
  pointer-events: none !important;
}

.simple-panel {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 10px !important;
  padding: 0 16px 16px !important;
}

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

.simple-panel .currency-option,
.simple-panel .theme-option {
  width: 100% !important;
  min-height: 44px !important;
  height: 44px !important;
  border-radius: 14px !important;
  background: #252a35 !important;
  border: 1px solid rgba(255,255,255,.10) !important;
  color: #f5f5f2 !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  cursor: pointer !important;
}

.simple-panel .currency-option {
  display: grid !important;
  place-items: center !important;
  font-size: 13px !important;
  font-weight: 800 !important;
}

.simple-panel .theme-option {
  display: grid !important;
  grid-template-columns: 24px 1fr !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 0 12px !important;
  text-align: left !important;
}

.simple-panel .theme-option > span {
  display: block !important;
  width: 16px !important;
  height: 16px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(255,255,255,.42) !important;
  box-shadow: 0 0 14px currentColor !important;
  background: currentColor !important;
}

.simple-panel .theme-option > strong {
  color: #f5f5f2 !important;
  font-size: 13px !important;
}

.simple-panel .theme-red > span { color: #ff5b5b !important; }
.simple-panel .theme-blue > span { color: #68a9ff !important; }
.simple-panel .theme-purple > span { color: #b58cff !important; }
.simple-panel .theme-green > span { color: #d9ff6a !important; }
.simple-panel .theme-orange > span { color: #ffad55 !important; }

.simple-panel .currency-option.is-selected,
.simple-panel .theme-option.is-selected {
  border-color: var(--active-accent) !important;
  box-shadow:
    0 0 0 1px rgba(var(--active-rgb), .22),
    0 0 16px rgba(var(--active-rgb), .18) !important;
}


/* V51 rebuild settings expand/collapse */
.simple-setting {
  padding: 0 !important;
  overflow: hidden !important;
}

.setting-collapse {
  width: 100% !important;
  min-height: 58px !important;
  padding: 0 16px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  border: 0 !important;
  border-radius: 22px !important;
  background: transparent !important;
  color: var(--text) !important;
  position: relative !important;
  z-index: 30 !important;
  cursor: pointer !important;
  pointer-events: auto !important;
  touch-action: manipulation !important;
}

.setting-collapse * {
  pointer-events: none !important;
}

.simple-panel {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 10px !important;
  padding: 0 16px 16px !important;
  max-height: none !important;
  overflow: visible !important;
}

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

.simple-panel .currency-option,
.simple-panel .theme-option {
  display: grid !important;
  width: 100% !important;
  min-height: 44px !important;
  height: 44px !important;
  border-radius: 14px !important;
  border: 1px solid rgba(255,255,255,.10) !important;
  background: #252a35 !important;
  color: #f5f5f2 !important;
  opacity: 1 !important;
  visibility: visible !important;
  cursor: pointer !important;
  pointer-events: auto !important;
}

.simple-panel .currency-option {
  place-items: center !important;
  font-size: 13px !important;
  font-weight: 800 !important;
}

.simple-panel .theme-option {
  grid-template-columns: 24px 1fr !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 0 12px !important;
  text-align: left !important;
}

.simple-panel .theme-option > span {
  display: block !important;
  width: 16px !important;
  height: 16px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(255,255,255,.42) !important;
  background: currentColor !important;
  box-shadow: 0 0 14px currentColor !important;
}

.simple-panel .theme-red > span { color: #ff5b5b !important; }
.simple-panel .theme-blue > span { color: #68a9ff !important; }
.simple-panel .theme-purple > span { color: #b58cff !important; }
.simple-panel .theme-green > span { color: #d9ff6a !important; }
.simple-panel .theme-orange > span { color: #ffad55 !important; }

.simple-panel .currency-option.is-selected,
.simple-panel .theme-option.is-selected {
  border-color: var(--active-accent) !important;
  box-shadow:
    0 0 0 1px rgba(var(--active-rgb), .22),
    0 0 16px rgba(var(--active-rgb), .18) !important;
}


/* V52 hard fix: expanded settings panels must show full contents */
.settings-panel {
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
}

.setting-block.simple-setting,
#currencySetting,
#backgroundSetting {
  height: auto !important;
  min-height: 58px !important;
  max-height: none !important;
  overflow: visible !important;
  display: block !important;
  padding: 0 !important;
}

#currencyPanel:not([hidden]),
#backgroundPanel:not([hidden]) {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 10px !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  padding: 0 16px 16px !important;
  margin: 0 !important;
  visibility: visible !important;
  opacity: 1 !important;
}

#currencyPanel[hidden],
#backgroundPanel[hidden] {
  display: none !important;
}

#currencyPanel .currency-option,
#backgroundPanel .theme-option {
  position: relative !important;
  display: grid !important;
  width: 100% !important;
  min-height: 44px !important;
  height: 44px !important;
  max-height: none !important;
  opacity: 1 !important;
  visibility: visible !important;
  overflow: visible !important;
  pointer-events: auto !important;
  transform: none !important;
  margin: 0 !important;
}

#currencyPanel .currency-option {
  place-items: center !important;
}

#backgroundPanel .theme-option {
  grid-template-columns: 24px 1fr !important;
  align-items: center !important;
  justify-items: start !important;
}

#backgroundPanel .theme-option > span,
#backgroundPanel .theme-option > strong {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
}

#backgroundPanel .theme-option > span {
  width: 16px !important;
  height: 16px !important;
  border-radius: 999px !important;
  background: currentColor !important;
}

#backgroundPanel .theme-red > span { color: #ff5b5b !important; }
#backgroundPanel .theme-blue > span { color: #68a9ff !important; }
#backgroundPanel .theme-purple > span { color: #b58cff !important; }
#backgroundPanel .theme-green > span { color: #d9ff6a !important; }
#backgroundPanel .theme-orange > span { color: #ffad55 !important; }

/* clear older clipping from collapsible-setting rules */
.collapsible-setting,
.background-setting {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}


/* V53 complete settings rebuild: no overlap, full visible option lists */
.settings-panel {
  display: block !important;
  box-sizing: border-box !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  padding: max(18px, env(safe-area-inset-top)) 18px max(36px, env(safe-area-inset-bottom)) !important;
}

.settings-panel > * {
  box-sizing: border-box !important;
}

.settings-header {
  display: flex !important;
  justify-content: space-between !important;
  align-items: start !important;
  gap: 14px !important;
  margin-bottom: 18px !important;
}

.settings-header h2 {
  margin: 4px 0 0 !important;
}

.close-settings {
  flex: 0 0 48px !important;
  width: 48px !important;
  height: 48px !important;
  min-height: 48px !important;
}

.setting-block {
  position: relative !important;
  box-sizing: border-box !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
  margin: 0 0 14px 0 !important;
  padding: 22px !important;
  display: block !important;
  border-radius: 24px !important;
}

.sound-setting {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 14px !important;
}

.sound-setting p {
  margin: 6px 0 0 !important;
}

.simple-setting {
  padding: 0 !important;
  overflow: visible !important;
}

.setting-collapse {
  box-sizing: border-box !important;
  width: 100% !important;
  min-height: 64px !important;
  height: 64px !important;
  padding: 0 22px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  border-radius: 24px !important;
  background: transparent !important;
  color: var(--text) !important;
  border: 0 !important;
  cursor: pointer !important;
  pointer-events: auto !important;
  touch-action: manipulation !important;
  position: relative !important;
  z-index: 2 !important;
}

.setting-collapse * {
  pointer-events: none !important;
}

.collapse-icon {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  border-radius: 999px !important;
  display: grid !important;
  place-items: center !important;
  background: rgba(255,255,255,.07) !important;
  color: var(--active-accent, #d9ff6a) !important;
  font-size: 22px !important;
  font-weight: 900 !important;
}

.simple-panel {
  box-sizing: border-box !important;
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 10px !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  padding: 0 22px 22px !important;
  margin: 0 !important;
  overflow: visible !important;
  opacity: 1 !important;
  visibility: visible !important;
}

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

.simple-panel .currency-option,
.simple-panel .theme-option {
  box-sizing: border-box !important;
  position: static !important;
  display: grid !important;
  width: 100% !important;
  height: 46px !important;
  min-height: 46px !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 14px !important;
  border-radius: 15px !important;
  background: #252a35 !important;
  border: 1px solid rgba(255,255,255,.10) !important;
  color: #f5f5f2 !important;
  opacity: 1 !important;
  visibility: visible !important;
  overflow: visible !important;
  pointer-events: auto !important;
  transform: none !important;
  cursor: pointer !important;
}

.simple-panel .currency-option {
  place-items: center !important;
  font-size: 14px !important;
  font-weight: 800 !important;
}

.simple-panel .theme-option {
  grid-template-columns: 24px 1fr !important;
  align-items: center !important;
  justify-items: start !important;
  gap: 10px !important;
  text-align: left !important;
}

.simple-panel .theme-option > span {
  display: block !important;
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  min-height: 16px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(255,255,255,.42) !important;
  background: currentColor !important;
  box-shadow: 0 0 14px currentColor !important;
}

.simple-panel .theme-option > strong {
  display: block !important;
  font-size: 14px !important;
  color: #f5f5f2 !important;
  font-weight: 800 !important;
}

.simple-panel .theme-red > span { color: #ff5b5b !important; }
.simple-panel .theme-blue > span { color: #68a9ff !important; }
.simple-panel .theme-purple > span { color: #b58cff !important; }
.simple-panel .theme-green > span { color: #d9ff6a !important; }
.simple-panel .theme-orange > span { color: #ffad55 !important; }

.simple-panel .currency-option.is-selected,
.simple-panel .theme-option.is-selected {
  border-color: var(--active-accent) !important;
  box-shadow: 0 0 0 1px rgba(var(--active-rgb), .22), 0 0 16px rgba(var(--active-rgb), .18) !important;
}

.profile-panel {
  padding: 22px !important;
}

.stat-row {
  display: flex !important;
  justify-content: space-between !important;
  gap: 12px !important;
  margin-top: 14px !important;
}

.reset-stats {
  width: 100% !important;
  margin-top: 18px !important;
}


/* V54 native details settings: no JS freeze, no overlap */
.native-setting {
  padding: 0 !important;
  overflow: visible !important;
  display: block !important;
  height: auto !important;
  max-height: none !important;
}

.native-setting > summary {
  list-style: none !important;
  width: 100% !important;
  min-height: 64px !important;
  height: 64px !important;
  padding: 0 22px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  border-radius: 24px !important;
  cursor: pointer !important;
  color: var(--text) !important;
  box-sizing: border-box !important;
  user-select: none !important;
  -webkit-user-select: none !important;
  touch-action: manipulation !important;
}

.native-setting > summary::-webkit-details-marker {
  display: none !important;
}

.native-setting .collapse-icon {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  border-radius: 999px !important;
  display: grid !important;
  place-items: center !important;
  background: rgba(255,255,255,.07) !important;
  color: var(--active-accent, #d9ff6a) !important;
  font-size: 22px !important;
  font-weight: 900 !important;
}

.native-setting[open] .collapse-icon {
  font-size: 0 !important;
}

.native-setting[open] .collapse-icon::before {
  content: "−";
  font-size: 22px !important;
  line-height: 1;
}

.native-panel {
  box-sizing: border-box !important;
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 10px !important;
  width: 100% !important;
  padding: 0 22px 22px !important;
  margin: 0 !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.native-panel .currency-option,
.native-panel .theme-option {
  box-sizing: border-box !important;
  display: grid !important;
  width: 100% !important;
  height: 46px !important;
  min-height: 46px !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 14px !important;
  border-radius: 15px !important;
  background: #252a35 !important;
  border: 1px solid rgba(255,255,255,.10) !important;
  color: #f5f5f2 !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  cursor: pointer !important;
}

.native-panel .currency-option {
  place-items: center !important;
  font-size: 14px !important;
  font-weight: 800 !important;
}

.native-panel .theme-option {
  grid-template-columns: 24px 1fr !important;
  align-items: center !important;
  justify-items: start !important;
  gap: 10px !important;
  text-align: left !important;
}

.native-panel .theme-option > span {
  display: block !important;
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  min-height: 16px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(255,255,255,.42) !important;
  background: currentColor !important;
  box-shadow: 0 0 14px currentColor !important;
}

.native-panel .theme-option > strong {
  display: block !important;
  font-size: 14px !important;
  color: #f5f5f2 !important;
  font-weight: 800 !important;
}

.native-panel .theme-red > span { color: #ff5b5b !important; }
.native-panel .theme-blue > span { color: #68a9ff !important; }
.native-panel .theme-purple > span { color: #b58cff !important; }
.native-panel .theme-green > span { color: #d9ff6a !important; }
.native-panel .theme-orange > span { color: #ffad55 !important; }

.native-panel .currency-option.is-selected,
.native-panel .theme-option.is-selected {
  border-color: var(--active-accent) !important;
  box-shadow: 0 0 0 1px rgba(var(--active-rgb), .22), 0 0 16px rgba(var(--active-rgb), .18) !important;
}


/* V55 splash bottom share and instructions */
.splash-inner {
  min-height: 100svh !important;
  width: min(92vw, 620px) !important;
  display: grid !important;
  grid-template-rows: 1fr auto auto auto !important;
  align-content: stretch !important;
  justify-items: center !important;
  gap: 18px !important;
  padding: max(36px, env(safe-area-inset-top)) 18px max(22px, env(safe-area-inset-bottom)) !important;
}

.splash-logo-clean-wrap,
.splash-logo-anim,
.splash-logo {
  align-self: end !important;
}

.splash-instructions {
  display: grid;
  justify-items: center;
  gap: 5px;
  max-width: 320px;
  text-align: center;
  color: rgba(245,245,242,.72);
}

.splash-instructions strong {
  color: #f5f5f2;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.splash-instructions span {
  font-size: 11px;
  line-height: 1.35;
}

.splash-share {
  align-self: end !important;
  margin-top: 0 !important;
  padding-bottom: 0 !important;
}

/* V55 profile username */
.username-field {
  display: grid;
  gap: 8px;
  margin: 16px 0 18px;
}

.username-field span {
  color: rgba(245,245,242,.68);
  font-size: 13px;
  font-weight: 800;
}

.username-field input {
  width: 100%;
  height: 46px;
  border-radius: 15px;
  border: 1px solid rgba(255,255,255,.12);
  background: #252a35;
  color: #f5f5f2;
  padding: 0 14px;
  font-size: 15px;
  font-weight: 800;
  outline: none;
  box-sizing: border-box;
}

.username-field input:focus {
  border-color: var(--active-accent, #d9ff6a);
  box-shadow: 0 0 0 1px rgba(var(--active-rgb), .22), 0 0 16px rgba(var(--active-rgb), .16);
}

/* V55 menu order spacing */
.profile-panel {
  margin-bottom: 14px !important;
}

.native-setting {
  margin-bottom: 14px !important;
}

.sound-setting {
  margin-bottom: 14px !important;
}


/* V65 hold bet button support */
#plusBet,
#minusBet,
.bet-panel button.round {
  -webkit-user-select: none !important;
  user-select: none !important;
  touch-action: manipulation !important;
}


/* V68 play screen spacing fix */
.app {
  gap: 10px !important;
}

.table,
.game-table,
.play-table {
  min-height: 500px !important;
  height: auto !important;
  padding: 22px 26px 24px !important;
  display: grid !important;
  grid-template-rows: auto 1fr auto 1fr !important;
  align-content: stretch !important;
  overflow: hidden !important;
}

.hand-section,
.dealer-section,
.player-section {
  position: relative !important;
  min-height: 150px !important;
}

.dealer-section {
  align-self: start !important;
}

.player-section {
  align-self: end !important;
  padding-bottom: 8px !important;
}

.hand,
.cards,
.dealer-cards,
.player-cards {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
  row-gap: 10px !important;
  align-items: flex-start !important;
  max-width: 100% !important;
}

.card {
  width: clamp(62px, 16vw, 84px) !important;
  height: clamp(92px, 23vw, 122px) !important;
  flex: 0 0 auto !important;
  margin: 0 !important;
}

.status-pill,
.message,
.message-pill {
  position: relative !important;
  z-index: 3 !important;
  margin: 12px auto !important;
  max-width: min(82%, 520px) !important;
  transform: none !important;
}

.controls,
.controls-panel,
.bet-panel {
  margin-top: 12px !important;
  padding: 18px 22px 20px !important;
  min-height: auto !important;
}

.bet-row,
.bet-main {
  margin-bottom: 12px !important;
}

.chip-row,
.chip-buttons {
  gap: 10px !important;
  margin-bottom: 12px !important;
}

.action-row,
.action-buttons {
  margin-top: 12px !important;
  gap: 10px !important;
}

.action-row button,
.action-buttons button {
  min-height: 56px !important;
}

.share-section {
  padding-top: 18px !important;
  padding-bottom: 20px !important;
}

@media (max-width: 430px) {
  .table,
  .game-table,
  .play-table {
    min-height: 470px !important;
    padding: 18px 20px 22px !important;
  }

  .hand-section,
  .dealer-section,
  .player-section {
    min-height: 138px !important;
  }

  .card {
    width: 58px !important;
    height: 88px !important;
  }

  .status-pill,
  .message,
  .message-pill {
    margin: 8px auto !important;
    max-width: 78% !important;
  }

  .controls,
  .controls-panel,
  .bet-panel {
    padding: 16px 18px 18px !important;
  }
}

@media (max-height: 760px) {
  .table,
  .game-table,
  .play-table {
    min-height: 430px !important;
    padding-top: 14px !important;
    padding-bottom: 16px !important;
  }

  .hand-section,
  .dealer-section,
  .player-section {
    min-height: 118px !important;
  }

  .card {
    width: 54px !important;
    height: 82px !important;
  }

  .controls,
  .controls-panel,
  .bet-panel {
    margin-top: 8px !important;
    padding-top: 12px !important;
  }
}


/* V70 centered splash layout */
.splash-screen,
.splash-container,
.splash-inner,
.hero-wrap {
  text-align: center !important;
  align-items: center !important;
  justify-content: center !important;
}

/* V70 oversized suit animation */
.splash-suit-cycle {
  position: relative;
  width: clamp(150px, 38vw, 260px);
  height: clamp(150px, 38vw, 260px);
  display: grid;
  place-items: center;
  margin: 90px auto 42px !important;
  pointer-events: none;
  filter:
    drop-shadow(0 0 22px rgba(255,255,255,.10))
    drop-shadow(0 0 60px rgba(255,255,255,.08));
}

.splash-suit-cycle .suit {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: clamp(150px, 38vw, 260px);
  line-height: 1;
  color: transparent;
  font-weight: 900;
  opacity: 0;
  transform: scale(.92);
  -webkit-text-stroke: 6px rgba(255,255,255,.96);
  animation: noirSuitCycle 8s ease-in-out infinite;
}

.suit-spade { animation-delay: 0s; }
.suit-heart { animation-delay: 2s; }
.suit-club { animation-delay: 4s; }
.suit-diamond { animation-delay: 6s; }

@keyframes noirSuitCycle {
  0% {
    opacity: 0;
    transform: scale(.88);
    filter: blur(8px);
  }
  10% {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
  }
  24% {
    opacity: 1;
    transform: scale(1);
  }
  34% {
    opacity: 0;
    transform: scale(1.08);
    filter: blur(8px);
  }
  100% {
    opacity: 0;
  }
}

/* Center all splash content */
.hero-logo,
.hero-tagline,
.play-button,
.splash-share,
.instructions {
  margin-left: auto !important;
  margin-right: auto !important;
  text-align: center !important;
}

@media (max-width: 480px) {
  .splash-suit-cycle {
    margin-top: 70px !important;
    margin-bottom: 34px !important;
  }
}


/* V71 split dealer/message/player table layout */
.split-table {
  display: grid !important;
  grid-template-rows: minmax(170px, 1fr) auto minmax(170px, 1fr) !important;
  gap: 14px !important;
  min-height: 560px !important;
  padding: 22px !important;
  overflow: hidden !important;
}

.split-table .hand-panel {
  border: 1px solid rgba(255,255,255,.08) !important;
  background: rgba(255,255,255,.018) !important;
  border-radius: 28px !important;
  padding: 22px !important;
  display: grid !important;
  grid-template-columns: 86px 1fr !important;
  gap: 14px !important;
  align-items: start !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

.split-table .score-block {
  min-width: 74px !important;
}

.split-table .score-block h2 {
  margin: 4px 0 0 !important;
}

.split-table .cards {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
  row-gap: 10px !important;
  align-items: flex-start !important;
  align-content: flex-start !important;
  max-width: 100% !important;
  min-height: 96px !important;
  overflow: visible !important;
}

.split-table .card {
  width: clamp(58px, 15vw, 78px) !important;
  height: clamp(86px, 21vw, 112px) !important;
  margin: 0 !important;
  flex: 0 0 auto !important;
}

.table-message-panel {
  display: grid !important;
  place-items: center !important;
  padding: 0 6px !important;
  min-height: 52px !important;
}

.table-message-panel .message {
  position: relative !important;
  transform: none !important;
  margin: 0 auto !important;
  width: min(82%, 520px) !important;
  max-width: 520px !important;
  z-index: 5 !important;
}

.controls {
  margin-top: 12px !important;
}

@media (max-width: 430px) {
  .split-table {
    grid-template-rows: minmax(150px, 1fr) auto minmax(150px, 1fr) !important;
    gap: 12px !important;
    min-height: 520px !important;
    padding: 16px !important;
  }

  .split-table .hand-panel {
    grid-template-columns: 70px 1fr !important;
    gap: 10px !important;
    padding: 16px !important;
    border-radius: 24px !important;
  }

  .split-table .cards {
    gap: 8px !important;
    row-gap: 8px !important;
    min-height: 84px !important;
  }

  .split-table .card {
    width: 54px !important;
    height: 82px !important;
  }

  .table-message-panel .message {
    width: 86% !important;
  }
}

@media (max-height: 760px) {
  .split-table {
    grid-template-rows: minmax(130px, 1fr) auto minmax(130px, 1fr) !important;
    min-height: 450px !important;
    gap: 10px !important;
    padding: 14px !important;
  }

  .split-table .hand-panel {
    padding: 13px !important;
    grid-template-columns: 62px 1fr !important;
  }

  .split-table .card {
    width: 48px !important;
    height: 72px !important;
  }

  .table-message-panel {
    min-height: 44px !important;
  }

  .controls {
    margin-top: 8px !important;
  }
}


/* V72 compact table + controls layout */
.split-table {
  grid-template-rows: minmax(120px, 1fr) auto minmax(120px, 1fr) !important;
  gap: 10px !important;
  min-height: 420px !important;
  padding: 14px !important;
}

.split-table .hand-panel {
  padding: 14px !important;
  border-radius: 22px !important;
  min-height: 120px !important;
}

.split-table .cards {
  min-height: 72px !important;
  gap: 8px !important;
}

.split-table .card {
  width: 52px !important;
  height: 78px !important;
}

.table-message-panel {
  min-height: 36px !important;
  padding: 0 !important;
}

.table-message-panel .message {
  width: 78% !important;
  padding: 10px 16px !important;
  font-size: 0.95rem !important;
}

.controls {
  margin-top: 8px !important;
  padding: 18px !important;
  border-radius: 28px !important;
}


/* V73 fit full play controls on screen */
.app {
  gap: 7px !important;
  padding-bottom: max(6px, env(safe-area-inset-bottom)) !important;
}

.top-bar {
  margin-bottom: 4px !important;
}

.logo {
  width: 190px !important;
}

.brand-tagline {
  font-size: 7px !important;
  margin-top: 1px !important;
}

.bank,
.menu-btn {
  min-height: 48px !important;
  height: 48px !important;
}

.split-table {
  min-height: 360px !important;
  grid-template-rows: 128px 42px 128px !important;
  gap: 8px !important;
  padding: 12px !important;
  margin-bottom: 8px !important;
}

.split-table .hand-panel {
  min-height: 118px !important;
  padding: 12px !important;
  border-radius: 20px !important;
  grid-template-columns: 62px 1fr !important;
}

.split-table .score-block h2,
#dealerScore,
#playerScore {
  font-size: 32px !important;
}

.split-table .label {
  font-size: 11px !important;
}

.split-table .cards {
  min-height: 70px !important;
  gap: 8px !important;
}

.split-table .card {
  width: 48px !important;
  height: 72px !important;
}

.table-message-panel {
  min-height: 38px !important;
}

.table-message-panel .message {
  padding: 8px 14px !important;
  font-size: 0.85rem !important;
}

.controls {
  margin-top: 6px !important;
  padding: 12px 16px 14px !important;
  border-radius: 24px !important;
}

.bet-panel {
  padding: 0 !important;
  margin-bottom: 8px !important;
}

.bet-panel .round,
#minusBet,
#plusBet {
  width: 46px !important;
  height: 46px !important;
  min-height: 46px !important;
}

#bet {
  font-size: 32px !important;
  line-height: 1 !important;
}

.chip-stack {
  gap: 8px !important;
  margin-bottom: 8px !important;
}

.chip {
  min-height: 34px !important;
  padding: 0 10px !important;
  font-size: 12px !important;
}

#deal.primary,
button.primary {
  min-height: 48px !important;
  height: 48px !important;
  margin: 8px 0 !important;
  font-size: 17px !important;
}

.actions {
  gap: 8px !important;
  margin-top: 8px !important;
}

.actions button {
  min-height: 48px !important;
  height: 48px !important;
  font-size: 16px !important;
}

.share-section {
  padding-top: 10px !important;
  padding-bottom: 8px !important;
}

.share-section p {
  font-size: 8px !important;
  margin-bottom: 6px !important;
}

.share-btn {
  width: 34px !important;
  height: 34px !important;
  min-height: 34px !important;
}

@media (max-height: 760px) {
  .split-table {
    min-height: 335px !important;
    grid-template-rows: 115px 38px 115px !important;
    gap: 7px !important;
  }

  .split-table .hand-panel {
    min-height: 108px !important;
    padding: 10px !important;
  }

  .split-table .card {
    width: 44px !important;
    height: 66px !important;
  }

  .controls {
    padding: 10px 14px 12px !important;
  }

  .actions button {
    min-height: 44px !important;
    height: 44px !important;
  }
}


/* V74 equal dealer/player panels with 2-row card support */
.split-table {
  grid-template-rows: 1fr auto 1fr !important;
  min-height: 360px !important;
  gap: 10px !important;
}

.split-table .hand-panel {
  min-height: 150px !important;
  height: 100% !important;
  display: flex !important;
  align-items: flex-start !important;
}

.split-table .cards {
  display: flex !important;
  flex-wrap: wrap !important;
  align-content: flex-start !important;
  gap: 6px !important;
  row-gap: 6px !important;
  max-width: 100% !important;
  padding-top: 2px !important;
}

.split-table .card {
  width: 42px !important;
  height: 64px !important;
  border-radius: 10px !important;
  flex: 0 0 auto !important;
}


/* V75 force Hit / Stay / Hint fully visible */
.app {
  min-height: 100svh !important;
  max-height: 100svh !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  padding-bottom: max(6px, env(safe-area-inset-bottom)) !important;
}

.top-bar {
  flex: 0 0 auto !important;
  margin-bottom: 2px !important;
}

.split-table {
  flex: 0 1 auto !important;
  min-height: 310px !important;
  max-height: 410px !important;
  grid-template-rows: 1fr auto 1fr !important;
  gap: 7px !important;
  padding: 10px !important;
  margin-bottom: 6px !important;
}

.split-table .hand-panel {
  min-height: 118px !important;
  padding: 10px !important;
  border-radius: 20px !important;
  grid-template-columns: 56px 1fr !important;
}

.split-table .score-block h2,
#dealerScore,
#playerScore {
  font-size: 30px !important;
  line-height: 1 !important;
}

.split-table .label {
  font-size: 10px !important;
  letter-spacing: .18em !important;
}

.split-table .cards {
  min-height: 64px !important;
  gap: 6px !important;
  row-gap: 6px !important;
}

.split-table .card {
  width: 42px !important;
  height: 64px !important;
  border-radius: 10px !important;
}

.table-message-panel {
  min-height: 34px !important;
}

.table-message-panel .message {
  padding: 7px 12px !important;
  font-size: 0.82rem !important;
  width: 78% !important;
}

.controls {
  flex: 0 0 auto !important;
  margin-top: 4px !important;
  padding: 10px 14px 12px !important;
  border-radius: 24px !important;
}

.bet-panel {
  margin-bottom: 6px !important;
}

#minusBet,
#plusBet,
.bet-panel .round {
  width: 42px !important;
  height: 42px !important;
  min-height: 42px !important;
}

#bet {
  font-size: 30px !important;
  line-height: 1 !important;
}

.chip-stack {
  gap: 7px !important;
  margin-bottom: 7px !important;
}

.chip {
  min-height: 30px !important;
  height: 30px !important;
  padding: 0 8px !important;
  font-size: 11px !important;
}

#deal.primary,
button.primary {
  min-height: 42px !important;
  height: 42px !important;
  margin: 7px 0 !important;
  font-size: 16px !important;
}

.actions {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 8px !important;
  margin-top: 7px !important;
}

.actions button {
  min-height: 44px !important;
  height: 44px !important;
  font-size: 15px !important;
  border-radius: 16px !important;
}

.share-section {
  flex: 0 0 auto !important;
  padding-top: 6px !important;
  padding-bottom: 4px !important;
}

.share-section p {
  font-size: 7px !important;
  margin-bottom: 4px !important;
}

.share-buttons {
  gap: 8px !important;
}

.share-btn {
  width: 28px !important;
  height: 28px !important;
  min-height: 28px !important;
}

@media (max-height: 760px) {
  .split-table {
    min-height: 290px !important;
    max-height: 360px !important;
  }

  .split-table .hand-panel {
    min-height: 104px !important;
  }

  .split-table .card {
    width: 38px !important;
    height: 58px !important;
  }

  .controls {
    padding: 8px 12px 10px !important;
  }

  .actions button {
    min-height: 40px !important;
    height: 40px !important;
  }
}


/* V76 lower play/bet area slightly and fix TOP UP text fit */
.split-table {
  margin-top: 8px !important;
  margin-bottom: 14px !important;
}

.controls {
  margin-top: 12px !important;
  transform: translateY(6px) !important;
}

.share-section {
  transform: translateY(8px) !important;
}

/* Bank / TOP UP fit */
.bank {
  overflow: hidden !important;
  display: grid !important;
  place-items: center !important;
  align-content: center !important;
  justify-items: center !important;
  padding: 7px 10px !important;
}

.bank span {
  display: block !important;
  line-height: 1 !important;
  margin: 0 0 4px 0 !important;
  font-size: 13px !important;
  white-space: nowrap !important;
}

.bank strong {
  display: block !important;
  line-height: .9 !important;
  margin: 0 !important;
  max-width: 100% !important;
  white-space: normal !important;
  word-break: normal !important;
  text-align: center !important;
}

.bank.bank-empty strong,
.bank .top-up,
.bank strong:has(.top-up) {
  font-size: 20px !important;
  line-height: .92 !important;
  letter-spacing: .03em !important;
}

/* fallback when TOP UP is plain text inside strong */
.bank strong {
  font-size: clamp(20px, 5.2vw, 34px) !important;
}

.bank strong[data-empty="true"],
.bank.empty strong,
.bank.is-empty strong {
  font-size: 20px !important;
  line-height: .92 !important;
}

@media (max-width: 430px) {
  .bank {
    min-width: 82px !important;
    width: 82px !important;
    height: 52px !important;
    min-height: 52px !important;
    padding: 6px 8px !important;
  }

  .bank span {
    font-size: 11px !important;
    margin-bottom: 3px !important;
  }

  .bank strong {
    font-size: 24px !important;
  }

  .bank.bank-empty strong,
  .bank.empty strong,
  .bank.is-empty strong {
    font-size: 17px !important;
    line-height: .9 !important;
  }
}

@media (max-height: 760px) {
  .split-table {
    margin-top: 6px !important;
    margin-bottom: 10px !important;
  }

  .controls {
    margin-top: 10px !important;
    transform: translateY(4px) !important;
  }

  .share-section {
    transform: translateY(6px) !important;
  }
}


/* V77 compact 2-row card handling */
.split-table .hand-panel {
  overflow: hidden !important;
}

.split-table .cards {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 44px)) !important;
  grid-auto-rows: 64px !important;
  gap: 6px !important;
  align-items: start !important;
  align-content: start !important;
  justify-content: start !important;
  max-height: 134px !important;
  overflow: hidden !important;
}

.split-table .cards.is-compact {
  grid-template-columns: repeat(5, minmax(0, 38px)) !important;
  grid-auto-rows: 56px !important;
  gap: 5px !important;
  max-height: 118px !important;
}

.split-table .cards.is-compact .card {
  width: 38px !important;
  height: 56px !important;
  border-radius: 9px !important;
  font-size: 0.78rem !important;
}

.split-table .cards.is-compact .card .rank,
.split-table .cards.is-compact .card-rank {
  font-size: 0.78rem !important;
}

.split-table .cards.is-compact .card .suit,
.split-table .cards.is-compact .card-suit {
  font-size: 0.9rem !important;
}

.split-table .card {
  width: 44px !important;
  height: 64px !important;
  border-radius: 10px !important;
}

@media (max-width: 430px) {
  .split-table .cards {
    grid-template-columns: repeat(4, 42px) !important;
    grid-auto-rows: 62px !important;
    max-height: 130px !important;
  }

  .split-table .cards.is-compact {
    grid-template-columns: repeat(5, 36px) !important;
    grid-auto-rows: 54px !important;
    gap: 5px !important;
    max-height: 114px !important;
  }

  .split-table .cards.is-compact .card {
    width: 36px !important;
    height: 54px !important;
  }
}

@media (max-height: 760px) {
  .split-table .cards {
    grid-template-columns: repeat(4, 38px) !important;
    grid-auto-rows: 58px !important;
    max-height: 120px !important;
  }

  .split-table .cards.is-compact {
    grid-template-columns: repeat(5, 33px) !important;
    grid-auto-rows: 50px !important;
    max-height: 105px !important;
  }

  .split-table .cards.is-compact .card {
    width: 33px !important;
    height: 50px !important;
    border-radius: 8px !important;
  }
}


/* V78 card display fix: no clipping, 2-row hands visible */
.split-table .hand-panel {
  overflow: visible !important;
  min-height: 132px !important;
}

.split-table .cards {
  display: flex !important;
  flex-wrap: wrap !important;
  align-content: flex-start !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  gap: 6px !important;
  row-gap: 6px !important;
  max-height: none !important;
  overflow: visible !important;
  min-height: 0 !important;
  padding-top: 0 !important;
}

.split-table .card {
  width: 40px !important;
  height: 60px !important;
  min-width: 40px !important;
  min-height: 60px !important;
  border-radius: 9px !important;
  flex: 0 0 40px !important;
  margin: 0 !important;
}

.split-table .cards.is-compact {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 5px !important;
  row-gap: 5px !important;
  max-height: none !important;
  overflow: visible !important;
}

.split-table .cards.is-compact .card {
  width: 34px !important;
  height: 52px !important;
  min-width: 34px !important;
  min-height: 52px !important;
  flex-basis: 34px !important;
  border-radius: 8px !important;
}

.split-table .cards.is-compact .card .rank,
.split-table .cards.is-compact .card-rank {
  font-size: 0.72rem !important;
}

.split-table .cards.is-compact .card .suit,
.split-table .cards.is-compact .card-suit {
  font-size: 0.82rem !important;
}

/* For very long hands, keep two rows without leaving the panel */
.split-table .cards.is-ultra-compact .card {
  width: 30px !important;
  height: 46px !important;
  min-width: 30px !important;
  min-height: 46px !important;
  flex-basis: 30px !important;
  border-radius: 7px !important;
}

@media (max-width: 430px) {
  .split-table .card {
    width: 38px !important;
    height: 58px !important;
    min-width: 38px !important;
    min-height: 58px !important;
    flex-basis: 38px !important;
  }

  .split-table .cards.is-compact .card {
    width: 32px !important;
    height: 50px !important;
    min-width: 32px !important;
    min-height: 50px !important;
    flex-basis: 32px !important;
  }

  .split-table .cards.is-ultra-compact .card {
    width: 28px !important;
    height: 44px !important;
    min-width: 28px !important;
    min-height: 44px !important;
    flex-basis: 28px !important;
  }
}

/* V78 make Stay reliably tappable */
#stay {
  pointer-events: auto !important;
  touch-action: manipulation !important;
  position: relative !important;
  z-index: 20 !important;
}


/* V79 AppLixir rewarded ad top-up UI */
.top-up-screen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(10px);
}

.top-up-screen[hidden] {
  display: none !important;
}

.top-up-card {
  position: relative;
  width: min(92vw, 390px);
  border-radius: 30px;
  padding: 28px 22px 24px;
  background: rgba(17,20,26,.98);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 28px 90px rgba(0,0,0,.62);
  text-align: center;
}

.top-up-card h2 {
  margin: 6px 0 8px;
  font-size: 32px;
  line-height: 1;
}

.top-up-copy {
  margin: 0 auto 18px;
  max-width: 280px;
  color: rgba(245,245,242,.72);
  font-size: 13px;
  line-height: 1.4;
}

.top-up-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 42px;
  height: 42px;
  min-height: 42px;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  color: #fff;
  border: 1px solid rgba(255,255,255,.10);
}

.reward-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.reward-option {
  min-height: 64px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.10);
  background: #252a35;
  color: #f5f5f2;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  text-align: left;
}

.reward-option strong {
  font-size: 15px;
}

.reward-option span {
  color: var(--active-accent, #d9ff6a);
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
}

.reward-option:disabled {
  opacity: .48;
  cursor: wait;
}

.reward-status {
  min-height: 18px;
  margin: 16px 0 0;
  color: rgba(245,245,242,.64);
  font-size: 12px;
  line-height: 1.35;
}

.reward-status.is-success {
  color: #3fe680;
}

.reward-status.is-error {
  color: #ff5b5b;
}


/* V80 fix player panel overlap and keep full table inside outer area */
.split-table {
  box-sizing: border-box !important;
  overflow: hidden !important;
  padding: 12px !important;
  gap: 8px !important;
  grid-template-rows: minmax(116px, 1fr) 38px minmax(116px, 1fr) !important;
  min-height: 365px !important;
  max-height: 430px !important;
}

.split-table .hand-panel {
  box-sizing: border-box !important;
  width: 100% !important;
  min-height: 116px !important;
  height: 100% !important;
  max-height: 160px !important;
  overflow: hidden !important;
  padding: 12px !important;
  border-radius: 22px !important;
  display: grid !important;
  grid-template-columns: 62px minmax(0, 1fr) !important;
  align-items: start !important;
}

.split-table .player-panel {
  margin: 0 !important;
  align-self: stretch !important;
}

.split-table .dealer-panel {
  margin: 0 !important;
  align-self: stretch !important;
}

.split-table .cards {
  display: flex !important;
  flex-wrap: wrap !important;
  align-content: flex-start !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  gap: 6px !important;
  row-gap: 5px !important;
  max-height: 118px !important;
  overflow: hidden !important;
  min-width: 0 !important;
  padding: 0 !important;
}

.split-table .card {
  width: 38px !important;
  height: 58px !important;
  min-width: 38px !important;
  min-height: 58px !important;
  flex: 0 0 38px !important;
  border-radius: 9px !important;
  margin: 0 !important;
}

.split-table .cards.is-compact .card {
  width: 32px !important;
  height: 50px !important;
  min-width: 32px !important;
  min-height: 50px !important;
  flex-basis: 32px !important;
}

.split-table .cards.is-ultra-compact .card {
  width: 28px !important;
  height: 44px !important;
  min-width: 28px !important;
  min-height: 44px !important;
  flex-basis: 28px !important;
}

.table-message-panel {
  min-height: 38px !important;
  height: 38px !important;
  padding: 0 !important;
}

.table-message-panel .message {
  padding: 8px 14px !important;
  font-size: 0.82rem !important;
  width: min(82%, 520px) !important;
}

/* V80 make Stay reliably clickable */
#stay {
  pointer-events: auto !important;
  touch-action: manipulation !important;
  position: relative !important;
  z-index: 100 !important;
}

/* V80 social buttons as wide rounded rectangles */
.share-section {
  width: 100% !important;
  padding-left: 28px !important;
  padding-right: 28px !important;
  box-sizing: border-box !important;
}

.share-section .share-buttons {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 10px !important;
  width: 100% !important;
  max-width: 520px !important;
  margin: 0 auto !important;
}

.share-section .share-btn {
  width: 100% !important;
  height: 44px !important;
  min-height: 44px !important;
  border-radius: 16px !important;
  display: grid !important;
  place-items: center !important;
}

.share-section .share-btn svg {
  width: 19px !important;
  height: 19px !important;
}

@media (max-height: 760px) {
  .split-table {
    grid-template-rows: minmax(104px, 1fr) 34px minmax(104px, 1fr) !important;
    min-height: 330px !important;
    max-height: 370px !important;
    gap: 6px !important;
    padding: 10px !important;
  }

  .split-table .hand-panel {
    min-height: 104px !important;
    max-height: 136px !important;
    padding: 10px !important;
    grid-template-columns: 54px minmax(0, 1fr) !important;
  }

  .split-table .card {
    width: 34px !important;
    height: 52px !important;
    min-width: 34px !important;
    min-height: 52px !important;
    flex-basis: 34px !important;
  }

  .split-table .cards.is-compact .card {
    width: 29px !important;
    height: 46px !important;
    min-width: 29px !important;
    min-height: 46px !important;
    flex-basis: 29px !important;
  }

  .share-section .share-btn {
    height: 38px !important;
    min-height: 38px !important;
  }
}


/* V81 make Stay tappable above overlays */
#stay {
  pointer-events: auto !important;
  touch-action: manipulation !important;
  position: relative !important;
  z-index: 200 !important;
}
