body.native-mobile-app {
  min-height: 100dvh;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  background: #031008;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.mobile-quick-row,
.mobile-chat-panel,
.mobile-menu-close {
  display: none;
}

body.native-mobile-app.game-started {
  overflow: hidden;
}

body.native-mobile-app.game-started .app-shell {
  position: fixed;
  inset: 0;
  height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

body.native-mobile-app.game-started .app-shell::-webkit-scrollbar {
  display: none;
}

body.native-mobile-app .start-screen {
  align-items: center;
  padding: max(18px, env(safe-area-inset-top)) 14px max(18px, env(safe-area-inset-bottom));
  overflow: auto;
}

body.native-mobile-app .start-card {
  width: min(100%, 460px);
  padding: 24px;
  border-radius: 22px;
}

body.native-mobile-app .start-card h1 {
  font-size: clamp(3.4rem, 17vw, 5.8rem);
}

body.native-mobile-app .start-copy,
body.native-mobile-app .start-mini-grid {
  display: none;
}

body.native-mobile-app .start-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

body.native-mobile-app .start-actions button {
  min-width: 0;
  white-space: normal;
}

body.native-mobile-app #startLocalBtn {
  grid-column: 1 / -1;
}

body.native-mobile-app button,
body.native-mobile-app input {
  min-height: 44px;
}

body.native-mobile-app .app-shell {
  width: 100%;
  padding: max(8px, env(safe-area-inset-top)) 8px max(8px, env(safe-area-inset-bottom));
}

body.native-mobile-app.game-started .site-footer,
body.native-mobile-app.game-started .public-content,
body.native-mobile-app.game-started .side-panel {
  display: none !important;
}

body.native-mobile-app.game-started .topbar {
  position: fixed;
  top: env(safe-area-inset-top);
  left: 0;
  right: 0;
  z-index: 30;
  gap: 0;
  padding: 6px 8px;
  border-radius: 0;
  background: rgba(3, 16, 8, 0.94);
  backdrop-filter: blur(14px);
}

body.native-mobile-app.game-started .topbar > div:first-child,
body.native-mobile-app.game-started #secureModeBadge,
body.native-mobile-app.game-started #currentAccountPill,
body.native-mobile-app.game-started #openAccountBtn,
body.native-mobile-app.game-started #openShopBtn,
body.native-mobile-app.game-started #openRulesBtn,
body.native-mobile-app.game-started .wallet-pill {
  display: none;
}

body.native-mobile-app.game-started .wallet-pill.table-pill {
  display: inline-flex;
}

body.native-mobile-app.game-started .wallet-pill.wallet-button {
  display: inline-flex;
}

body.native-mobile-app .score-card {
  display: grid;
  grid-template-columns: 0.72fr 1.2fr 0.95fr 0.82fr 0.74fr;
  gap: 6px;
  width: 100%;
}

body.native-mobile-app .score-card span,
body.native-mobile-app .score-card button {
  min-width: 0;
  min-height: 34px;
  padding: 0.38rem 0.45rem;
  font-size: 0.72rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.native-mobile-app.game-started .main-grid {
  display: block;
  padding-top: 58px;
  padding-bottom: 96px;
}

body.native-mobile-app.game-started .game-panel {
  display: block;
}

body.native-mobile-app.game-started .table-wrap {
  position: relative;
}

body.native-mobile-app.game-started .felt-table {
  min-height: max(390px, calc(100dvh - 74px - env(safe-area-inset-top) - env(safe-area-inset-bottom))) !important;
  border-width: 8px !important;
  border-radius: 34px !important;
  padding-bottom: 0 !important;
}

body.native-mobile-app.game-started .dealer-badge {
  display: grid !important;
  right: 3%;
  width: 54px;
  height: 54px;
  border-width: 3px;
  font-size: 0.58rem;
  opacity: 0.78;
}

body.native-mobile-app.game-started .seat {
  left: 4% !important;
  right: 4% !important;
}

body.native-mobile-app.game-started .seat-ai {
  top: 12px !important;
}

body.native-mobile-app.game-started .seat-human {
  bottom: 82px !important;
}

body.native-mobile-app.game-started .seat-label {
  margin-bottom: 6px;
  font-size: 0.82rem;
}

body.native-mobile-app.game-started .board-zone {
  top: 40% !important;
}

body.native-mobile-app.game-started .board-zone p {
  margin-bottom: 0.35rem;
  font-size: 0.78rem;
}

body.native-mobile-app.game-started .card-tile {
  width: clamp(32px, 8.4vw, 46px);
  border-radius: 8px;
}

body.native-mobile-app.game-started .board-cards .card-tile {
  width: clamp(36px, 9.2vw, 50px);
}

body.native-mobile-app.game-started .card-rank {
  font-size: 1rem;
}

body.native-mobile-app.game-started .hole-set {
  gap: 0.18rem;
  padding: 0.18rem;
  border-radius: 10px;
}

body.native-mobile-app.game-started .hole-row {
  scrollbar-width: none;
}

body.native-mobile-app.game-started .hole-row::-webkit-scrollbar {
  display: none;
}

body.native-mobile-app.game-started .hole-set.used.selected {
  opacity: 1;
}

body.native-mobile-app.game-started .controls-card.in-table-controls {
  position: absolute !important;
  inset: 0 !important;
  z-index: 5;
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  pointer-events: none;
}

body.native-mobile-app.game-started .bet-row-v14 {
  position: absolute !important;
  left: 5%;
  top: auto;
  bottom: 62px;
  transform: none;
  z-index: 8;
  display: grid;
  grid-template-columns: auto minmax(68px, 86px) minmax(76px, auto) !important;
  gap: 0.3rem 0.4rem;
  align-items: center;
  width: min(420px, calc(100% - 40px));
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  pointer-events: auto;
}

body.native-mobile-app.game-started .bet-row-v14 label {
  color: #ffe08a;
  font-size: 0.64rem;
  font-weight: 1000;
  white-space: nowrap;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

body.native-mobile-app.game-started .bet-row-v14 input {
  width: 100%;
  min-height: 34px;
  padding: 0.32rem 0.5rem;
  text-align: center;
  border: 0 !important;
  color: #f6fff8;
  background: rgba(2, 11, 5, 0.82);
  box-shadow: inset 0 0 0 1px rgba(246, 200, 95, 0.2);
}

body.native-mobile-app.game-started .bet-row-v14 input:focus {
  box-shadow: inset 0 0 0 1px rgba(246, 200, 95, 0.58), 0 0 14px rgba(246, 200, 95, 0.16);
}

body.native-mobile-app.game-started #buyInLabel {
  grid-column: 1;
  grid-row: 1;
}

body.native-mobile-app.game-started #betAmount {
  grid-column: 2;
  grid-row: 1;
}

body.native-mobile-app.game-started #roundBetLabel {
  grid-column: 1;
  grid-row: 2;
}

body.native-mobile-app.game-started #roundBetAmount {
  grid-column: 2;
  grid-row: 2;
}

body.native-mobile-app.game-started #submitBetBtn {
  display: inline-flex;
  grid-column: 3;
  grid-row: 1 / span 2;
  align-self: stretch;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  min-height: 34px;
  padding: 0.36rem 0.62rem;
  border: 0 !important;
  color: #061108;
  background: linear-gradient(180deg, #ffe08a, #f6c85f);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.26);
  font-size: 0.68rem;
}

body.native-mobile-app.game-started #submitBetBtn:disabled {
  color: rgba(246, 255, 248, 0.45);
  background: rgba(2, 11, 5, 0.44);
  box-shadow: none;
}

body.native-mobile-app.game-started #maxBetBtn {
  display: none;
}

body.native-mobile-app.game-started #lockedBetText {
  display: block;
  grid-column: 1 / -1;
  min-height: 0;
  max-width: 100%;
  padding: 0.16rem 0.35rem 0;
  color: rgba(246, 255, 248, 0.82);
  font-size: 0.56rem;
  font-weight: 800;
  line-height: 1.2;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.72);
}

body.native-mobile-app.game-started.match-buyin-locked #buyInLabel,
body.native-mobile-app.game-started.match-buyin-locked #betAmount {
  display: none;
}

body.native-mobile-app.game-started.match-buyin-locked #roundBetLabel,
body.native-mobile-app.game-started.match-buyin-locked #roundBetAmount {
  grid-row: 1;
}

body.native-mobile-app.game-started.match-buyin-locked #roundBetLabel {
  grid-column: 1;
}

body.native-mobile-app.game-started.match-buyin-locked #roundBetAmount {
  grid-column: 2;
}

body.native-mobile-app.game-started.match-buyin-locked #maxBetBtn {
  grid-row: 1;
}

body.native-mobile-app.game-started.match-buyin-locked #submitBetBtn {
  grid-column: 3;
  grid-row: 1;
}

body.native-mobile-app.game-started .bank-pot-row {
  display: none !important;
}

body.native-mobile-app.game-started .bank-pot-row span {
  min-width: 0;
  font-size: 0.72rem;
}

body.native-mobile-app.game-started #mobileModeText {
  display: none;
}

body.native-mobile-app.game-started .action-row {
  position: absolute !important;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  display: flex !important;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap !important;
  gap: 0.34rem;
  width: min(760px, calc(100% - 34px));
  margin: 0 !important;
  padding: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  background: transparent;
  box-shadow: none;
  pointer-events: auto;
}

body.native-mobile-app.game-started .action-row::-webkit-scrollbar {
  display: none;
}

body.native-mobile-app.game-started .action-row button {
  flex: 0 0 auto;
  min-width: 84px;
  min-height: 38px;
  padding: 0.38rem 0.58rem;
  border: 0 !important;
  border-radius: 999px;
  color: #f6fff8;
  background: rgba(2, 11, 5, 0.82);
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.22);
  font-size: 0.68rem;
  white-space: nowrap;
}

body.native-mobile-app.game-started .action-row button:not(:disabled) {
  color: #ffe08a;
}

body.native-mobile-app.game-started .action-row button:disabled {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(246, 255, 248, 0.45);
  border: 0 !important;
  background: rgba(2, 11, 5, 0.44);
  opacity: 0.72;
  box-shadow: none;
}

body.native-mobile-app.game-started .mobile-quick-row {
  position: absolute !important;
  right: 5.5%;
  bottom: 76px;
  z-index: 7;
  display: flex;
  gap: 0.45rem;
  pointer-events: auto;
}

body.native-mobile-app.game-started .mobile-quick-row button {
  min-width: 82px;
  min-height: 38px;
  padding: 0.42rem 0.7rem;
  border: 0 !important;
  border-radius: 999px;
  background: rgba(2, 11, 5, 0.82);
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.22);
  font-size: 0.74rem;
}

body.native-mobile-app.game-started .mobile-chat-panel {
  position: absolute !important;
  right: 4%;
  bottom: 76px;
  z-index: 18;
  display: none;
  width: min(350px, 38%);
  max-height: min(340px, 58%);
  padding: 0.65rem;
  border: 1px solid rgba(246, 200, 95, 0.28);
  border-radius: 16px;
  background: rgba(2, 11, 5, 0.94);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.42);
  pointer-events: auto;
}

body.native-mobile-app.game-started.mobile-chat-open .mobile-chat-panel {
  display: grid;
  gap: 0.55rem;
}

body.native-mobile-app.game-started.mobile-chat-open .mobile-quick-row {
  display: none;
}

body.native-mobile-app.game-started .mobile-chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

body.native-mobile-app.game-started .mobile-chat-head button {
  min-height: 32px;
  padding: 0.3rem 0.55rem;
  font-size: 0.68rem;
}

body.native-mobile-app.game-started .mobile-chat-panel .chat-messages {
  max-height: 150px;
  min-height: 76px;
  overflow: auto;
  padding: 0.5rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.76rem;
}

body.native-mobile-app.game-started .mobile-chat-panel .chat-input-row {
  margin-top: 0;
}

body.native-mobile-app.game-started .mobile-chat-panel input {
  min-height: 38px;
  padding: 0.42rem 0.65rem;
}

body.native-mobile-app.game-started .mobile-chat-panel #mobileSendChatBtn {
  min-height: 38px;
  padding: 0.42rem 0.7rem;
}

body.native-mobile-app.game-started.mobile-menu-open .side-panel {
  position: fixed;
  inset: max(8px, env(safe-area-inset-top)) 8px max(8px, env(safe-area-inset-bottom));
  z-index: 40;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 10px;
  margin: 0 !important;
  padding: 0.7rem;
  overflow: auto !important;
  max-height: none !important;
  border: 1px solid rgba(246, 200, 95, 0.28);
  border-radius: 22px;
  background: rgba(3, 16, 8, 0.96);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.58);
  -webkit-overflow-scrolling: touch;
}

body.native-mobile-app.game-started.mobile-menu-open .mobile-menu-close {
  position: sticky;
  top: 0;
  z-index: 2;
  display: inline-flex;
  grid-column: 1 / -1;
  justify-content: center;
  width: 100%;
  min-height: 40px;
}

body.native-mobile-app.game-started.mobile-menu-open .side-panel .card,
body.native-mobile-app.game-started.mobile-menu-open .side-panel .controls-card {
  border-radius: 16px;
}

body.native-mobile-app.game-started.mobile-menu-open .side-panel .card {
  padding: 0.85rem;
}

body.native-mobile-app.game-started.mobile-menu-open .wallet-card h2 {
  font-size: 1.15rem;
}

body.native-mobile-app.game-started.mobile-menu-open .game-log,
body.native-mobile-app.game-started.mobile-menu-open .chat-messages {
  max-height: 140px;
}

body.native-mobile-app.game-started .timer-row {
  position: absolute !important;
  top: 14px;
  right: 9%;
  width: 132px;
  min-height: 32px;
  margin: 0 !important;
  padding: 0.35rem 0.6rem;
  border: 0;
  border-radius: 0;
  font-size: 0.76rem;
  background: rgba(2, 11, 5, 0.78);
  box-shadow: none;
  pointer-events: auto;
}

body.native-mobile-app.game-started .timer-row strong {
  font-size: 0.86rem;
}

body.native-mobile-app.game-started .tip-text {
  display: none;
}

body.native-mobile-app.game-started .result-banner {
  z-index: 12;
  display: block;
  padding: 0;
  border-radius: 0;
  background: transparent;
  pointer-events: none;
}

body.native-mobile-app.game-started .result-box {
  position: absolute;
  right: 4%;
  top: 48%;
  width: min(280px, 30%);
  padding: 0.65rem 0.75rem;
  border-radius: 14px;
  background: rgba(2, 11, 5, 0.76);
  backdrop-filter: blur(8px);
  pointer-events: auto;
}

body.native-mobile-app.game-started .result-box h2 {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.2;
}

body.native-mobile-app.game-started .result-box p,
body.native-mobile-app.game-started .victory-mark,
body.native-mobile-app.game-started .result-action-btn {
  display: none;
}

@media (orientation: landscape) {
  body.native-mobile-app.game-started .app-shell {
    padding: 0 8px max(6px, env(safe-area-inset-bottom)) !important;
  }

  body.native-mobile-app.game-started .topbar {
    height: 46px;
    min-height: 0;
    padding: 4px 8px !important;
  }

  body.native-mobile-app.game-started .score-card {
    display: grid !important;
    grid-template-columns: minmax(74px, 0.75fr) minmax(136px, 1.1fr) minmax(118px, 0.95fr) minmax(86px, 0.7fr) !important;
    gap: 6px !important;
    align-items: center;
  }

  body.native-mobile-app.game-started .score-card span,
  body.native-mobile-app.game-started .score-card button {
    min-height: 32px !important;
    padding: 0.28rem 0.5rem !important;
    font-size: 0.68rem !important;
  }

  body.native-mobile-app.game-started .main-grid {
    padding-top: 52px !important;
    padding-bottom: 54px !important;
  }

  body.native-mobile-app.game-started .felt-table {
    min-height: max(390px, calc(100dvh - 58px - env(safe-area-inset-top) - env(safe-area-inset-bottom))) !important;
    border-width: 7px !important;
  }

  body.native-mobile-app.game-started .seat {
    left: 4.4% !important;
    right: 4.4% !important;
  }

  body.native-mobile-app.game-started .seat-ai {
    top: 10px !important;
  }

  body.native-mobile-app.game-started .seat-human {
    bottom: 118px !important;
  }

  body.native-mobile-app.game-started .seat-label {
    margin-bottom: 5px;
    font-size: 0.78rem;
  }

  body.native-mobile-app.game-started .hole-row {
    justify-content: space-between !important;
    gap: 10px !important;
    overflow-x: visible !important;
    padding: 0 0.2rem !important;
  }

  body.native-mobile-app.game-started .hole-set {
    gap: 0.22rem;
    padding: 0.2rem;
  }

  body.native-mobile-app.game-started .card-tile {
    width: clamp(32px, 5vw, 52px) !important;
  }

  body.native-mobile-app.game-started .board-cards {
    gap: 0.45rem !important;
  }

  body.native-mobile-app.game-started .board-cards .card-tile {
    width: clamp(34px, 5.2vw, 56px) !important;
  }

  body.native-mobile-app.game-started .board-zone {
    top: 41% !important;
  }

  body.native-mobile-app.game-started .bet-row-v14 {
    left: 5%;
    top: auto;
    bottom: 54px;
    width: min(520px, calc(100% - 360px));
    grid-template-columns: auto minmax(56px, 72px) auto minmax(56px, 72px) minmax(74px, 86px) !important;
  }

  body.native-mobile-app.game-started .bet-row-v14 #buyInLabel {
    grid-column: 1;
    grid-row: 1;
  }

  body.native-mobile-app.game-started .bet-row-v14 #betAmount {
    grid-column: 2;
    grid-row: 1;
  }

  body.native-mobile-app.game-started .bet-row-v14 #roundBetLabel {
    grid-column: 3;
    grid-row: 1;
  }

  body.native-mobile-app.game-started .bet-row-v14 #roundBetAmount {
    grid-column: 4;
    grid-row: 1;
  }

  body.native-mobile-app.game-started .bet-row-v14 #submitBetBtn {
    grid-column: 5;
    grid-row: 1;
  }

  body.native-mobile-app.game-started .bet-row-v14 #lockedBetText {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  body.native-mobile-app.game-started.match-buyin-locked .bet-row-v14 {
    width: min(310px, calc(100% - 360px));
    grid-template-columns: auto minmax(64px, 82px) minmax(74px, 86px) !important;
  }

  body.native-mobile-app.game-started .timer-row {
    top: 14px;
    right: 8%;
    width: 124px;
    min-height: 30px;
    font-size: 0.72rem;
  }

  body.native-mobile-app.game-started .dealer-badge {
    right: 3.2%;
    width: 48px;
    height: 48px;
    font-size: 0.52rem;
  }

  body.native-mobile-app.game-started .action-row {
    left: 5%;
    bottom: 10px;
    transform: none;
    justify-content: flex-start;
    width: min(560px, calc(100% - 390px));
    padding: 0;
  }

  body.native-mobile-app.game-started .action-row button {
    min-width: 78px;
    min-height: 38px;
    padding: 0.36rem 0.52rem;
    font-size: 0.64rem;
  }

  body.native-mobile-app.game-started .mobile-quick-row {
    right: 5%;
    bottom: 10px;
  }

  body.native-mobile-app.game-started .mobile-chat-panel {
    bottom: 60px;
  }

  body.native-mobile-app.game-started.mobile-menu-open .side-panel {
    grid-template-columns: repeat(3, minmax(190px, 1fr));
    gap: 8px;
    padding: 0.55rem;
    border-radius: 16px;
  }

  body.native-mobile-app.game-started.mobile-menu-open .side-panel .card {
    padding: 0.7rem;
  }

  body.native-mobile-app.game-started.mobile-menu-open .side-panel h2 {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  body.native-mobile-app .start-card h1 {
    font-size: 3.1rem;
  }

  body.native-mobile-app .score-card {
    grid-template-columns: minmax(64px, 0.8fr) minmax(116px, 1.2fr) minmax(88px, 1fr) minmax(66px, 0.7fr);
  }

  body.native-mobile-app.game-started .main-grid {
    padding-top: 88px !important;
    padding-bottom: 178px !important;
  }

  body.native-mobile-app.game-started .action-row {
    bottom: 8px;
    justify-content: flex-start;
    width: calc(100% - 18px);
    padding: 0;
  }

  body.native-mobile-app.game-started .felt-table {
    min-height: max(520px, calc(100dvh - 98px - env(safe-area-inset-top) - env(safe-area-inset-bottom))) !important;
  }

  body.native-mobile-app.game-started .seat-human {
    bottom: 190px !important;
  }

  body.native-mobile-app.game-started .board-zone {
    top: 38% !important;
  }

  body.native-mobile-app.game-started .bet-row-v14 {
    left: 12px;
    right: 12px;
    top: auto;
    bottom: 108px;
    transform: none;
    grid-template-columns: auto minmax(74px, 1fr) minmax(72px, 86px) !important;
    width: auto;
  }

  body.native-mobile-app.game-started .action-row button {
    min-width: 82px;
  }

  body.native-mobile-app.game-started .timer-row {
    top: 10px;
    right: 12px;
    width: 116px;
  }

  body.native-mobile-app.game-started .mobile-quick-row {
    right: 16px;
    bottom: 56px;
  }

  body.native-mobile-app.game-started .mobile-chat-panel {
    left: 16px;
    right: 16px;
    bottom: 68px;
    width: auto;
    max-height: 44%;
  }

  body.native-mobile-app.game-started.mobile-menu-open .side-panel {
    grid-template-columns: 1fr;
  }

  body.native-mobile-app.game-started .dealer-badge {
    display: none !important;
  }

  body.native-mobile-app.game-started .result-box {
    left: 12px;
    right: 12px;
    top: 112px;
    width: auto;
  }
}
