.mobile-wallet-slot { display: none; }
.mobile-game-safe-area { position: fixed; inset: auto 0 0; height: 0; padding-bottom: env(safe-area-inset-bottom, 0px); visibility: hidden; pointer-events: none; }
.game-swipe-enabled > .game-stage:not(.ledger-stage) { touch-action: pan-y pinch-zoom; }
.game-swipe-enabled > .is-game-swiping { transform: translate3d(var(--game-swipe-offset, 0px), 0, 0); will-change: transform; user-select: none; -webkit-user-select: none; }

@media (max-width: 900px) {
  html.mobile-game-layout {
    scroll-snap-type: y proximity;
    scroll-padding-top: var(--mobile-game-header-space, 72px);
    scroll-padding-bottom: var(--mobile-game-viewport-bottom, 0px);
  }
  html.mobile-game-layout.mobile-game-snap-paused { scroll-snap-type: none; }
  html.mobile-game-layout .play-surface {
    scroll-snap-align: end;
    scroll-snap-stop: normal;
    scroll-margin-bottom: var(--mobile-game-result-space, 56px);
  }
  .game-page .bet-bar { flex-wrap: wrap; gap: 8px; padding: 12px; }
  .game-page .stepper { height: 44px; grid-template-columns: 44px minmax(52px, 76px) 44px; }
  .game-page .stepper input, .game-page .wager-ghost { font-size: 16px; }
  .game-page .sound-toggle { width: 44px; height: 44px; flex-basis: 44px; }
  .game-page .play-button, .game-page .auto-continue { min-height: 44px; height: auto; }
  .game-page .quick-bets button { min-height: 44px; }
  .game-page .selection { order: 5; width: 100%; flex: 0 0 100%; min-height: 18px; text-align: left; line-height: 1.5; }
  .game-page .mobile-wallet-slot { order: 6; display: flex; align-items: flex-start; width: 100%; min-height: 56px; flex: 0 0 100%; padding-top: 8px; border-top: 1px solid #302b21; }
  .game-page .wallet-value.mobile-wallet-value { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; width: 100%; min-height: 30px; margin: 0; }
  .game-page .mobile-wallet-value[data-active="false"] { visibility: hidden; opacity: 0; }
  .game-page .mobile-wallet-value[data-active="true"] { visibility: visible; opacity: 1; }
  .game-page .mobile-wallet-value .mobile-wallet-label { flex: 0 0 auto; margin: 0; color: #c4b58e; font-size: 12px; }
  .game-page .mobile-wallet-value .wallet-balance-number { flex: 0 0 auto; margin-left: auto; font-size: 20px; }
  .game-page .result-line { min-height: 48px; padding: 10px 2px 2px; line-height: 18px; overflow-wrap: anywhere; }
}

@media (max-width: 640px) {
  .game-page .bet-bar { display: grid; grid-template-columns: 24px minmax(0, 1fr) 96px; grid-template-rows: auto auto auto auto; align-items: center; gap: 8px; }
  .bet-bar > label[for="wager"] { grid-column: 1; grid-row: 1; }
  .game-page .bet-bar .stepper { grid-column: 2; grid-row: 1; width: 100%; grid-template-columns: 44px minmax(0, 1fr) 44px; }
  .game-page .bet-bar .sound-toggle { grid-column: 3; grid-row: 1; justify-self: end; }
  .game-page .bet-bar .play-button { grid-column: 1 / 3; grid-row: 2; width: 100%; min-width: 0; margin: 0; }
  .game-page .bet-bar .auto-continue { grid-column: 3; grid-row: 2; justify-self: end; gap: 6px; white-space: nowrap; }
  .game-page .bet-bar .selection { grid-column: 1 / -1; grid-row: 3; order: 0; margin: 0; }
  .game-page .bet-bar .mobile-wallet-slot { grid-column: 1 / -1; grid-row: 4; order: 0; }
}
