/* Mobile layouts keep controls at readable size instead of shrinking the whole desktop. */
@media(max-width:1000px){
 body{min-width:0!important}dialog{max-width:calc(100vw - 20px)!important;max-height:90dvh;overflow:auto;padding:18px!important}dialog :is(input,select,textarea){max-width:100%;font-size:16px}dialog table{font-size:12px}dialog pre{overflow-wrap:anywhere;white-space:pre-wrap}
 .stage-header{position:relative!important;display:flex!important;flex-wrap:wrap;align-items:center;gap:8px;padding:10px!important;width:100%;height:auto!important;background:#101b20ed!important;z-index:20}.stage-header::before{display:none!important}
 .stage-header .sprite,.stage-header .header-online,.stage-header .header-steam-login{position:relative!important;inset:auto!important;transform:none!important}
 .stage-header .brand{width:calc(100% - 85px)!important;height:48px!important;order:0}.stage-header .brand img{object-fit:contain;object-position:left}
 html[data-auth] .stage-header .header-online{order:-1;max-width:75px;width:70px;font-size:10px!important;flex-shrink:0}
 .stage-header nav{order:1;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%;gap:3px}.stage-header .ui-nav{width:auto!important;height:44px!important;font-size:15px!important}
 .stage-header .ui-profile{order:2;width:calc(100% - 56px)!important;height:50px!important}.stage-header .ui-settings{order:3;width:48px!important;height:50px!important}
 .stage-header .ui-wallet{order:4;width:calc(50% - 4px)!important;height:54px!important}.stage-header .header-steam-login{order:2;width:100%!important;height:48px!important}
 .stage-header #guest-preferences{position:relative!important;inset:auto!important;order:3;width:44px;height:44px}.stage-header #language-switch{position:relative!important;inset:auto!important;order:5}
 .portal-header,.portal-account{max-width:100%;min-width:0}.portal-account{flex-wrap:wrap}.portal-nav{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%;overflow:visible}.portal-nav a{min-height:44px;padding:12px 6px}.portal-brand{max-width:calc(100% - 80px)}
 .rf-panel,.admin-content,.admin-layout,.rf-pad{min-width:0}.rf-panel header{flex-wrap:wrap}.rf-table-wrap,.admin-table-scroll{max-width:100%;overflow:auto}.rf-account-tools{flex-wrap:wrap}.rf-profile-trade{min-width:0;width:100%}.rf-profile-trade input{width:100%;min-width:0}.rf-profile-stats{overflow-wrap:anywhere}
 .upgrade-viewport,.chinook-viewport,.roulette-viewport{height:auto!important;overflow:visible!important}
 #upgrade-stage,#chinook-stage,#roulette-stage{position:relative!important;width:100%!important;height:auto!important;transform:none!important;display:flex!important;flex-direction:column;gap:14px;overflow:hidden!important;background-size:auto 1000px!important;aspect-ratio:auto}
 #upgrade-stage>.up-panel,#upgrade-stage>.up-presets,#upgrade-stage>.up-selection-note,#upgrade-stage>.up-cta{position:relative!important;inset:auto!important;width:calc(100% - 24px)!important;margin:0 12px;height:auto;flex-shrink:0}
 #upgrade-stage>.up-source,#upgrade-stage>.up-target{height:360px}.up-source{order:1}.up-target{order:2}.up-mechanism{order:3;position:relative!important;inset:auto!important;align-self:center;zoom:var(--mobile-up,1)}#upgrade-stage>.up-cta{order:4;min-height:60px}.up-presets{order:5;flex-wrap:wrap;min-height:50px}.up-presets button{min-height:42px}.up-selection-note{order:6;min-height:46px}.up-inventory{order:7}.up-catalog{order:8;margin-bottom:24px!important}
 .up-panel header{height:auto!important;flex-wrap:wrap;padding:14px!important}.up-panel h2{font-size:20px!important}.up-panel .up-filters{width:100%;display:grid;grid-template-columns:1fr 1fr}.up-filters input,.up-filters select{width:100%!important;height:42px;font-size:14px}.up-filters input[type=search]{grid-column:1/-1}
 #upgrade-stage .up-grid{grid-template-columns:repeat(2,minmax(0,1fr));height:640px!important;max-height:70dvh;padding:12px!important;gap:10px}.up-count{position:relative!important;inset:auto!important;gap:10px;padding:8px 12px;flex-wrap:wrap;font-size:12px}.up-source-items{height:216px}.item-card{height:155px}.up-total{left:14px;right:14px}.up-target-card{margin:12px 14px}
 #chinook-stage .ch-heading{position:relative;inset:auto;width:300px;height:108px;margin:0 12px;order:1}#chinook-stage .ch-scene{position:relative!important;inset:auto;width:1672px;height:800px;zoom:var(--mobile-scene);order:2}
 #chinook-stage .ch-waiting{position:relative;inset:auto;width:100%;padding:12px;order:3}#chinook-stage .ch-waiting strong{font-size:46px}#chinook-stage .ch-waiting h2{font-size:22px}
 #chinook-stage .ch-panel,#chinook-stage[data-phase] .ch-roster{position:relative!important;inset:auto!important;width:calc(100% - 24px)!important;height:auto!important;margin:0 12px;order:4}.ch-entry{padding-bottom:20px}.ch-entry .ch-panel-heading{min-height:56px}.ch-entry .ch-primary{min-height:52px;font-size:23px!important}
 #chinook-stage .ch-clock-panel{order:3}#chinook-stage .ch-rewards{order:5}#chinook-stage .ch-roster{order:6}#chinook-stage[data-phase] #participant-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.ch-roster .ch-panel-heading{flex-wrap:wrap;height:auto!important}.ch-roster .ch-panel-heading h2{font-size:22px}
 #chinook-stage .ch-how{order:7;position:relative;inset:auto;width:calc(100% - 24px);margin:0 12px;height:auto;display:grid;grid-template-columns:1fr;gap:10px}.ch-how h3{font-size:18px}.ch-how p{font-size:14px}#chinook-stage .ch-previous{order:8;margin-bottom:24px}#reward-grid .ch-reward{height:100px}.ch-reward strong{font-size:18px!important}
 .roulette-page .r-intro{display:none!important}.roulette-page .r-machine{position:relative!important;width:550px;height:560px;align-self:center;zoom:var(--mobile-wheel);order:1}.roulette-page .r-machine>.sprite,.roulette-page .r-machine>.r-box{left:calc((var(--x) - 565)*1px)!important;top:calc((var(--y) - 90)*1px)!important}
 .roulette-page .r-betting{position:relative!important;width:443px;height:382px;align-self:center;zoom:var(--mobile-bet);order:2}.roulette-page .r-betting>.sprite,.roulette-page .r-betting>.r-box{left:calc((var(--x) - 1205)*1px)!important;top:calc((var(--y) - 252)*1px)!important}
 .roulette-page .r-history{position:relative!important;width:443px;height:122px;align-self:center;zoom:var(--mobile-bet);order:3}.roulette-page .r-history>.sprite,.roulette-page .r-history>.r-box{left:calc((var(--x) - 1205)*1px)!important;top:calc((var(--y) - 126)*1px)!important}
 .roulette-page .r-tables{position:relative!important;display:flex!important;gap:14px;flex-direction:column;align-items:center;order:4;margin-bottom:24px!important}.roulette-page .r-player-table{position:relative!important;width:calc(var(--pw)*1px);height:227px;zoom:var(--mobile-table)}.roulette-page .r-player-table>.sprite,.roulette-page .r-player-table>.r-box{left:calc((var(--x) - var(--ox))*1px)!important;top:calc((var(--y) - var(--oy))*1px)!important}
 #reference-stage{display:flex;flex-direction:column;gap:16px;aspect-ratio:auto;container-type:normal;background:url('assets/source/environment.png') center top/auto 1100px #091217}#reference-stage>.environment{display:none}
 #reference-stage .hero,#reference-stage .live,#reference-stage .games,#reference-stage .bottom{position:relative!important;display:flex;flex-direction:column;gap:16px;margin:0 12px;padding:0;width:calc(100% - 24px)}#reference-stage .hero{align-items:flex-start}.hero .sprite{position:relative!important;inset:auto!important;width:100%!important;height:auto;line-height:1.4}.hero .headline{max-width:340px;aspect-ratio:385/233}.hero .intro{height:auto!important;white-space:normal;font-size:17px;padding:12px!important}.hero .hero-play,.hero .hero-chinook{min-height:52px;font-size:22px!important}
 #reference-stage .live,#reference-stage .game-card,#reference-stage .bottom>div,#reference-stage .bottom>section{position:relative;border:1px solid #805137;background:#102027e6;border-radius:5px;padding:16px;min-height:180px;overflow:hidden}
 #reference-stage :is(.live,.game-card,.bottom) .sprite{position:relative!important;inset:auto!important;width:100%!important;height:auto!important;line-height:1.3;margin:6px 0}
 #reference-stage :is(.live,.game-card,.bottom) .panel-art{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;opacity:.28;z-index:0}.game-card .ui-description,.bottom .ui-description{white-space:normal;font-size:16px!important;min-height:48px}.game-card .ui-cta,.bottom .ui-cta{min-height:52px;font-size:22px!important}.game-card .ui-badge{max-width:170px;min-height:30px}.ui-heading strong{font-size:23px!important}#reference-stage .timer-frame{width:130px!important;height:70px!important}
 #reference-stage #drop-list,#reference-stage #winner-list{position:relative;inset:auto;width:100%;padding:8px 0;min-height:100px}#reference-stage #countdown{position:relative;inset:auto;width:130px;height:35px;font-size:28px}#reference-stage :is(.wheel-light,.rotor,.upgrade-light,.upgrade-chevron,.live-light){display:none}.drop-row{grid-template-columns:30px minmax(50px,1fr) 55px minmax(50px,1fr);gap:5px;min-height:60px}.winner-row{grid-template-columns:24px 22px minmax(40px,1fr) 40px minmax(45px,1fr) 60px;gap:3px;min-height:45px;font-size:11px}.winner-price{font-size:12px}.winner-price .ammo{width:18px;margin:0}
}
@media(max-width:1000px){
 #roulette-stage{background:linear-gradient(#101c24c9,#081219e8),url('assets/chinook/environment.png') center top/auto 900px!important}
 .roulette-page :is(.r-machine,.r-betting,.r-history,.r-player-table)>.sprite,.roulette-page :is(.r-machine,.r-betting,.r-history,.r-player-table)>.r-box{width:calc(var(--w)*1px)!important;height:calc(var(--h)*1px)!important}
}
@media(max-width:1000px){
 #home-viewport{height:auto!important;overflow:visible!important}#reference-stage{position:relative!important;width:100%!important;height:auto!important;transform:none!important;overflow:hidden!important;aspect-ratio:auto!important}
 #reference-stage .hero .headline{height:200px!important;width:330px!important;max-width:100%}#reference-stage .hero .headline>img{object-fit:contain;object-position:left}
 #reference-stage .hero .headline-en{position:absolute;inset:0;width:100%;height:100%}#reference-stage .hero .headline-en img{width:100%;height:100%;object-fit:contain;object-position:left}
 #reference-stage .hero .hero-play,#reference-stage .hero .hero-chinook{height:52px!important}
 #reference-stage .game-card .timer-frame>img{position:absolute;inset:0;width:100%;height:100%}#reference-stage .timer-frame .arrival-label{position:relative;inset:auto;display:block;font-size:12px}#reference-stage .bottom .top-info{min-height:80px}
}
