/* Phone only, loaded last: everything that is pressed answers a finger (about 40px each way).
   Where there is no room to draw a bigger button, an invisible margin around it answers too. */
body.phone button,body.phone input,body.phone .uname{touch-action:manipulation;-webkit-tap-highlight-color:transparent}
body.phone button:not(:disabled):active{filter:brightness(1.2)}
/* top bar of a game */
body.phone.ingame #mtop{grid-template-columns:minmax(84px,max-content) minmax(0,1fr) minmax(84px,max-content)}
body.phone #mtop button{height:40px}
body.phone .mt-acts button{width:40px}
/* lobby */
body.phone #walletbtn{min-height:40px}
body.phone #mute{min-height:40px;min-width:40px}
/* a long chip count must never run into the title: the title gives way */
body.phone.home-on header{flex-wrap:nowrap;gap:6px;padding-inline:10px}
body.phone.home-on header .logo{flex:1 1 0;min-width:0;justify-content:center;white-space:nowrap;overflow:hidden;font-size:clamp(15px,4.8vw,21px)}
body.phone.home-on header .logo #logoico svg{width:28px;height:28px}
body.phone.home-on header .wallet,body.phone.home-on header #tabs{flex:none}
body.phone .ml-hello .act{min-height:40px}
body.phone .ml-hello div>span{padding-block:11px;margin-block:-11px}
body.phone .ml-hello .uname{display:inline-block;padding:11px 0;margin:-11px 0;min-width:40px}
body.phone.home-on .ml .hm-panel button{min-height:40px}
/* windows */
body.phone .sc-modal .sc-box .x,body.phone .xt-modal .xt-x,body.phone .modal .x{width:40px;height:40px;padding:0}
body.phone .sh-item button,body.phone .pc-tabs button,body.phone .pc-out,body.phone #xt-loan [data-amt],body.phone .tr-skip{min-height:40px}
body.phone #xt-wallet button,body.phone #xt-loan button{min-height:40px}
/* round help / info buttons: a little bigger, and reaching further than they look */
body.phone .gh-btn,body.phone .sk-info{width:34px;height:34px;min-width:34px;flex:none}
body.phone .gh-btn::after,body.phone .sk-info::after{content:"";position:absolute;inset:-5px;border-radius:50%}
body.phone .sk-info,body.phone .hr-tools .gh-btn{position:relative}
/* scratch cards */
body.phone .sk-filter button{height:40px;min-width:46px}
body.phone .sk-item .sk-buy{height:42px}
body.phone .sk-dock button{height:44px}
body.phone .sk-resume{height:44px}
body.phone .st-serial{font-size:3.5cqw}
body.phone .st-cell small{font-size:max(10px,3.4cqw)}
body.phone .st-bonusrow span small{font-size:max(10px,3.3cqw)}
body.phone .st-serial{font-size:max(10px,3.5cqw)}
/* video poker */
body.phone .vp .vp-bet input,body.phone .vp .vp-bet button{height:40px}
body.phone .vp .vp-bet button{min-width:52px}
body.phone .vp .vp-quick button{height:40px}
body.phone .vp .vp-main,body.phone .vp .vp-tip{height:46px}
body.phone .vp .vp-dock{gap:5px;padding-top:6px}
/* horse race */
body.phone .hr .hr-who{height:40px}
body.phone .hr .hr-quick button,body.phone .hr .hr-dock>button{height:40px}
body.phone .hr .hr-bhead button{width:40px;height:40px}
body.phone .hr .hr-dock{gap:5px}
@media(max-height:700px){
  body.phone .vp .vp-pays div{line-height:1.3;font-size:11.5px}
  body.phone .vp .vp-main,body.phone .vp .vp-tip{height:42px}
  body.phone .hr .hr-horses .hr-card{min-height:40px}
}
/* video poker: the help button has its own place beside the message, never on a card */
body.phone .vp .vp-msg{flex:none;min-height:36px;width:100%;display:flex;align-items:center;justify-content:center;padding-inline:42px;box-sizing:border-box}
body.phone .vp .vp-table>.gh-btn{top:7px;inset-inline-start:8px}
body.phone .vp .vp-table{justify-content:flex-start}
body.phone .vp .vp-cards{margin-block:auto}
/* a short screen: the card gets shorter (smaller picture, no serial number) so it can be wider */
@media(max-height:700px){
  body.phone .sk-stage .st{width:min(100cqw - 8px,(100cqh - 6px) / 1.5,440px);aspect-ratio:100/150}
  body.phone .st .st-head{height:23cqw}
  body.phone .st .st-goal{top:27.5cqw;height:6cqw}
  body.phone .st .st-play{top:35cqw}
  body.phone .st .st-pays{top:121.5cqw;height:26cqw}
  body.phone .st .st-serial{display:none}
  body.phone .st>.st-banner{top:117cqw}
}
body.phone .st-pays em{font-size:max(10px,3.3cqw);opacity:.85}
/* a very low screen: the whole lobby still fits above the menu, and the little cards are not cut */
@media(max-height:600px){
  body.phone .ml .ml-first{min-height:396px;gap:4px}
  body.phone .ml .ml-grid,body.phone .ml .ml-pair{gap:4px}
  body.phone .ml .ml-hello{min-height:44px;padding-block:2px}
  body.phone .ml .ml-jack{padding:0;min-height:40px}body.phone .ml-jack small{display:none}body.phone .ml-jack b{font-size:19px}
  body.phone .ml .ml-grid .t-blackjack .ml-art .hm-cards .pc,body.phone .ml .ml-grid .t-videopoker .ml-art .hm-cards .pc{--cw:min(24px,48cqh,28cqw)!important}
}
/* beside the name, the little cards are centred inside the tile with room to spare */
@media(max-height:760px){
  body.phone .ml .ml-grid .t-blackjack .ml-art,body.phone .ml .ml-grid .t-videopoker .ml-art{height:calc(100% - 6px);margin:0;align-self:center;overflow:visible}
  body.phone .ml .ml-grid .t-blackjack .ml-art .hm-cards .pc{--cw:min(34px,52cqh,34cqw)!important}
  body.phone .ml .ml-grid .t-videopoker .ml-art .hm-cards .pc{--cw:min(30px,50cqh,24cqw)!important}
}
@media(max-height:600px){body.phone .ml .ml-grid .t-blackjack .ml-art .hm-cards .pc,body.phone .ml .ml-grid .t-videopoker .ml-art .hm-cards .pc{--cw:min(22px,46cqh,22cqw)!important}}
/* the real cause: the computer lobby's fixed height pushed the little cards down */
body.phone .ml .ml-art .hm-cards{height:100%}

/* ---------- the older games ---------- */
/* roulette */
body.phone .mrl .mr-who{height:38px;min-width:46px;justify-content:center;border-radius:19px}
body.phone .mrl .mr-btns button{height:40px!important}
/* slots */
body.phone .sl .sl-side .sl-sm{height:40px}
body.phone .sl .sl-betbox .sl-sm{height:44px}
/* blackjack: the button area already had the room */
body.phone .bjm .bj-bet .row:nth-child(2) button{height:40px}
body.phone .bjm .bj-bet .row:nth-child(3) button{height:44px}
body.phone .bjm .bj-limits{font-size:10.5px}
/* mines */
body.phone .mn .mn-bet button,body.phone .mn .mn-bet input{height:40px}
body.phone .mn .mn-quick button{height:38px}
body.phone .mn .mn-side>input[type=range]{height:40px}
body.phone .mn .mn-main,body.phone .mn #mn-rand{height:44px}
@media(max-height:680px){
  body.phone .mrl .mr-btns button{height:38px!important}
  body.phone .sl .sl-side .sl-sm{height:38px}
  body.phone .sl .sl-betbox .sl-sm{height:40px}
  body.phone .bjm .bj-bet .row:nth-child(2) button{height:38px}
  body.phone .bjm .bj-bet .row:nth-child(3) button{height:40px}
  body.phone .bjm .bj-bet{gap:3px}
  body.phone .bjm .bj-chip svg{width:38px;height:38px}
  body.phone .mn .mn-side{gap:3px;padding-top:4px}
  body.phone .mn .mn-bet button,body.phone .mn .mn-bet input,body.phone .mn .mn-quick button,body.phone .mn .mn-side>input[type=range]{height:38px}
  body.phone .mn .mn-main,body.phone .mn #mn-rand{height:40px}
}
/* a very low screen: bigger rows would take from the boards, so mines and roulette keep their former sizes */
@media(max-height:600px){
  body.phone .mn .mn-side{gap:4px;padding-top:5px}
  body.phone .mn .mn-bet button,body.phone .mn .mn-bet input{height:32px}
  body.phone .mn .mn-quick button{height:26px}
  body.phone .mn .mn-side>input[type=range]{height:30px}
  body.phone .mn .mn-main,body.phone .mn #mn-rand{height:38px}
  body.phone .mrl .mr-btns button{height:32px!important}
  body.phone .mrl .mr-who{height:26px}
}
