/* mobile.css: phone + tablet layout (loaded last, so it wins). Everything is inside media queries, desktop is untouched. */
html{-webkit-text-size-adjust:100%}
@supports(height:100dvh){@media(max-width:820px){body.h-screen{height:100dvh}}}
@media(max-width:820px){
  header{padding-left:8px!important;padding-right:8px!important;gap:6px;padding-top:env(safe-area-inset-top)}
  header .hl{flex:0 0 auto!important;width:auto!important;min-width:0}
  header .menu-btn{width:38px;height:38px;flex:none;font-size:18px;display:grid;place-items:center}
  header .hr{flex:0 0 auto!important;width:auto!important;gap:4px}
  header .hr .icon-btn{width:34px;height:34px;flex:none}
  header>div:nth-child(2){gap:6px;min-width:0;flex:1 1 auto;justify-content:center}
  .balance-pill{padding:7px 10px;font-size:13px;white-space:nowrap}.balance-pill .live-dot{display:none}
  header .btn-primary{padding:8px 12px;font-size:13px}
  .hc-chip{flex:none}
  /* games: the game board first, the bet controls under it */
  .g-wrap{display:flex!important;flex-direction:column;gap:12px}.g-wrap>.g-stbox,.g-wrap>.g-stage{order:-1!important}.g-wrap>.g-stage{min-height:0!important}.g-wrap>.g-ctl{order:0!important}
  .g-stage{padding:12px!important}
  input,select,textarea{font-size:16px!important}                 /* stops iOS zooming into fields */
  button,.btn-primary,.btn-ghost{min-height:40px}
  .nav-item{padding-top:11px;padding-bottom:11px}
  .sidebar{width:82vw!important;max-width:300px;padding-bottom:env(safe-area-inset-bottom)}
  main,.main,#view-home,#view-game{padding-left:12px;padding-right:12px}
  .tb-tabs{flex-wrap:wrap!important;gap:6px!important}.tb-tabs button{flex:none;white-space:nowrap;padding:8px 12px!important;font-size:13px}
  /* nothing in a game page may be wider than the phone (the case reels used to push the page to 1700px wide) */
  .g-wrap>*{width:100%!important;min-width:0!important;max-width:100%!important}
  .cs-wrap,.cs-strips,.cs-reel,.bt-arena,.bt-side,.tb-felt,.tb-two,.tb-two>*{min-width:0;max-width:100%}
  /* live tables on phones: compact seats so the bet buttons are on screen, controls full width */
  .tb-felt{padding:10px!important;display:flex;flex-direction:column}.tb-felt>.tb-ctl{order:3;margin:0 0 12px!important}.tb-felt>.tb-seats{order:4}
  .tb-seats{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:6px!important}
  .tb-seat{min-height:0!important;padding:6px 4px!important;gap:3px!important}.tb-seat.empty{opacity:.55}.tb-seat.empty .tb-cards,.tb-seat.empty .bt,.tb-seat.empty .tt,.tb-seat.empty .st{display:none}
  .tb-seat .av{width:26px!important;height:26px!important;font-size:12px}.tb-seat .tb-pc{width:26px!important;height:38px!important;font-size:11px!important}
  .tb-dl{margin-bottom:6px!important}.tb-dl img{width:40px!important;height:40px!important}
  .tb-ctl,.tb-ctl .g-ctl{width:100%;min-width:0}.tb-ctl .g-ctl>*{min-width:0;max-width:100%}.tb-ctl .g-row{flex-wrap:wrap}.tb-ctl .g-row>button{flex:1 1 30%}
  .tb-res{min-height:70px!important}.tb-ball{width:64px!important;height:64px!important;font-size:26px!important}.tb-die{font-size:58px!important}
  .tb-board.vert .tb-c{padding:9px 2px!important;font-size:15px}
  .tb-side{max-height:220px!important}
  .tb-grid{grid-template-columns:1fr!important}
  .g-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
  .g-tile{min-height:150px}
  table{display:block;overflow-x:auto}
  .bets-grid{overflow-x:auto}
  #authGate{padding:12px;align-items:start}#authGate .ag-card{width:100%;margin:auto}
  .modal,.hd-box,.wal-box,[class*="modal"]>div{max-width:100vw}
  #gdock{bottom:calc(8px + env(safe-area-inset-bottom))}
}
@media(max-width:480px){
  header .hr .icon-btn[title^="Search"]{display:none}
  .balance-pill{font-size:12px;padding:6px 8px}
  header .btn-primary{padding:7px 10px}
  .hero-title{font-size:28px!important}
  .g-tile b{font-size:13px}
}
@media(hover:none){.g-tile:hover,.tb-card:hover{transform:none}}
#authGate .ag-tos[hidden]{display:none!important}
/* header cleanup: the logo already sits in the sidebar, and the profit/loss graph opens from "Live stats" on a game page (that button still clicks the hidden 📈) */
header .brand,.pfoot .brand{display:none!important}
#pnlBtn{display:none!important}
/* icons in the sidebar Originals list: SVG / image thumbnails must stay icon-sized */
.sub-ico svg,.sub-ico img{width:22px!important;height:22px!important;max-width:22px!important;max-height:22px!important;margin:0!important;display:block;object-fit:cover;border-radius:5px}
