/* Inline stake browsing: no modal or backdrop. Reserve room for both rows. */
@media(orientation:landscape){
 html,body{height:100%;min-height:0;overflow:hidden}
 body #stage{width:min(100vw,calc(100dvh * 1.82),1560px);height:auto;min-height:0;max-height:100dvh;aspect-ratio:1.82}
}
#stakes.bet-rail{display:flex;flex-direction:column;gap:3px;width:40%;min-width:0;max-width:640px;align-items:stretch;flex-shrink:1}
#stakes .bet-current{display:flex;justify-content:center;align-items:center;gap:12px;font-size:11px;letter-spacing:.07em;white-space:nowrap;color:#ffe49a}
#stakes .bet-current strong{font:700 clamp(17px,1.6cqw,27px) Arial,sans-serif;color:#fff;letter-spacing:0;font-variant-numeric:tabular-nums}
#stakes .bet-current small{display:inline;font:9px Arial,sans-serif}
#stakes.bet-rail .bet-current button,#stakes.bet-rail .bet-page{min-width:28px;width:28px;height:28px;padding:0;border-radius:50%;font:22px Arial,sans-serif;background:#14151a88;border:1px solid #fff6;box-shadow:none;flex:none}
#stakes .bet-scroll{display:flex;align-items:center;gap:5px;min-width:0}
#stakes .bet-track{position:relative;display:flex;align-items:stretch;gap:5px;overflow-x:auto;scrollbar-width:none;overscroll-behavior-x:contain;touch-action:pan-x;min-width:0;flex:1;padding:3px 1px;cursor:grab}
#stakes .bet-track::-webkit-scrollbar{display:none}
#stakes.bet-rail .bet-track button{flex:0 0 calc((100% - 20px)/5);min-width:60px;min-height:33px;border-radius:12px;padding:5px 7px;font:800 clamp(14px,1.35cqw,22px) Arial,sans-serif;white-space:nowrap;border-color:#c4bba56b;background:linear-gradient(#232730c9,#0c1017ce);color:#fff;box-shadow:inset 0 1px #ffffff20}
#stakes.bet-rail .bet-track button.selected{background:linear-gradient(#37855a,#174935);border-color:#fff2a3;color:#fff5c7;box-shadow:0 0 12px #74d39f42,inset 0 1px #fff7}
#stakes.bet-rail button:disabled{opacity:.36}#stakes.bet-rail .bet-track button.selected:disabled{opacity:.7}
@media(orientation:portrait) and (max-width:1200px){#stakes.bet-rail{width:100%;max-width:700px;flex:none;gap:3px}#stakes .bet-current{font-size:10px}#stakes .bet-current strong{font-size:20px}#stakes.bet-rail .bet-track button{font-size:16px;min-width:62px;min-height:34px}#stakes.bet-rail .bet-current button,#stakes.bet-rail .bet-page{width:30px;height:30px;min-width:30px}}
@media(orientation:landscape) and (max-height:500px){#stakes.bet-rail{gap:0}#stakes.bet-rail .bet-current button,#stakes.bet-rail .bet-page{width:22px;min-width:22px;height:22px;font-size:18px}#stakes.bet-rail .bet-track button{min-width:44px;min-height:25px;padding:2px 4px;font-size:13px}#stakes .bet-current strong{font-size:15px}}
@media(orientation:portrait) and (max-width:1200px){
 footer:has(.bet-rail){height:auto;min-height:0;flex-wrap:wrap;gap:5px 2%;padding:4px 2%}
 footer:has(.bet-rail) .meter{min-width:28%;order:0}
 footer:has(.bet-rail) .tools{order:0}
 #stakes.bet-rail{order:2}
 #stage[data-family=cascade] #cabinet{max-height:calc(100dvh - 285px)}
}
@media(orientation:portrait) and (min-width:651px) and (max-width:1200px){
 #stage[data-family=cascade] #cabinet{max-height:none;width:min(100%,calc((100dvh - 440px)*1.23))}
}
@media(orientation:landscape) and (max-height:500px){
 #stage:has(.bet-rail){width:min(100vw,calc(100dvh * 1.82));min-height:0;height:100dvh;aspect-ratio:auto}
 #stage:has(.bet-rail) #playfield{height:65%}
 #stage:has(.bet-rail) footer{height:16%}
}

/* tab1 (owner 2026-10-15, tablet APK): landscape screens narrower than the 2.05/1.82 stage letterboxed it and cut the bet rail; fill the height instead */
@media(orientation:landscape) and (min-height:501px) and (max-aspect-ratio:205/100){html body #stage{height:100dvh!important;aspect-ratio:auto!important}}

/* tab2 (owner 2026-10-15): phone portrait stage starts at top, phone landscape header/playfield/footer no overlap */
@media(orientation:portrait) and (max-width:650px){html,body{height:100%;margin:0}html body #stage{height:100dvh!important;min-height:0!important;margin-top:0!important;top:0!important}}@media(orientation:landscape) and (max-height:500px){html body #stage:has(.bet-rail){display:flex!important;flex-direction:column!important}html body #stage:has(.bet-rail) header{flex:0 0 19%!important;height:19%!important;min-height:0!important}html body #stage:has(.bet-rail) #playfield{flex:1 1 auto!important;height:auto!important;min-height:0!important}html body #stage:has(.bet-rail) footer{flex:0 0 20%!important;height:20%!important;min-height:0!important}}

/* hm2 (owner 2026-10-15): footer home button same size as its neighbours */
html body #stage footer #rjhome.rjhome-bar{width:2.5cqw!important;height:2.5cqw!important;min-width:0!important;margin-right:0!important}html body #stage footer #rjhome.rjhome-bar svg{width:58%!important;height:58%!important}@media(max-width:650px) and (orientation:portrait){html body #stage footer #rjhome.rjhome-bar{width:7cqw!important;height:7cqw!important}}
