/* Mobile controls share space without stretching the command illustrations. */
@media(max-width:700px){
 html body .mobile-hud-layout.mobile-hud-layout:not(.has-enlarged-type).has-affairs-hud .palace-upper>.palace-authority{
 height:92px!important;max-height:92px!important;min-height:92px!important;
 flex-direction:column!important;justify-content:center!important;gap:5px!important;padding:7px 4px!important;
 }
 html body .mobile-hud-layout.mobile-hud-layout:not(.has-enlarged-type).has-affairs-hud .palace-authority .authority-regalia-art{width:38px!important;height:45px!important}
 html body .mobile-hud-layout.mobile-hud-layout:not(.has-enlarged-type).has-affairs-hud .palace-authority strong{font-size:14px!important;line-height:18px!important}
 html body .mobile-hud-layout.mobile-hud-layout:not(.has-enlarged-type):not(.is-room-result):not(.is-lobby){grid-template-rows:44px 164px 32px minmax(0,1fr) 56px 54px!important}
 html body .mobile-hud-layout.mobile-hud-layout:not(.has-enlarged-type).has-affairs-hud:not(.is-room-result):not(.is-lobby){grid-template-rows:44px 212px 32px minmax(0,1fr) 56px 54px!important}
 html body .mobile-hud-layout.mobile-hud-layout:not(.has-enlarged-type):not(.is-room-result):not(.is-lobby) .palace-rooms{
 height:56px!important;grid-template-rows:52px!important;gap:4px!important;padding:2px 0!important;
 }
 html body .mobile-hud-layout.mobile-hud-layout:not(.has-enlarged-type):not(.is-room-result):not(.is-lobby) .palace-rooms>button{
 height:52px!important;min-height:52px!important;max-height:52px!important;padding-block:10px!important;
 }
 html body .mobile-hud-layout.mobile-hud-layout:not(.is-room-result):not(.palace-management-view) .palace-desk{grid-template-rows:auto auto minmax(0,1fr) 32px!important}
 html body .mobile-hud-layout.mobile-hud-layout:not(.is-room-result) .palace-pages{
 height:32px!important;min-height:32px!important;max-height:32px!important;padding:0!important;margin:0!important;align-items:center!important;
 }
 html body .mobile-hud-layout.mobile-hud-layout:not(.is-room-result) .palace-pages button{
 height:32px!important;min-height:32px!important;max-height:32px!important;padding:3px 12px!important;line-height:20px!important;
 }
}

/* The outer game frame is sufficient on narrow screens. */
@media(max-width:700px){
 html body .mobile-hud-layout.mobile-hud-layout::after{content:none!important;display:none!important;border:0!important;box-shadow:none!important}
 html body .mobile-hud-layout.mobile-hud-layout{box-shadow:none!important;outline:none!important}
 html body .mobile-hud-layout.mobile-hud-layout .palace-footer{
 left:0!important;right:0!important;width:100%!important;margin:0!important;
 padding-left:0!important;padding-right:4px!important;gap:4px!important;
 grid-template-columns:minmax(0,1fr) 108px!important;
 }
 html body .mobile-hud-layout.mobile-hud-layout .palace-slots{
 width:100%!important;max-width:none!important;min-width:0!important;margin:0!important;
 padding-left:0!important;padding-right:0!important;border:0!important;box-shadow:none!important;
 }
 html body .mobile-hud-layout.mobile-hud-layout .palace-slot{max-width:none!important;margin-left:0!important}
}

@media(max-width:700px){
 html body .mobile-hud-layout.mobile-hud-layout .palace-footer{border-left-width:0!important;border-right-width:0!important}
}

@media(max-width:700px){
 /* Lobby footers must anchor to the stage, not its padded grid cell. */
 html body .palace-stage.mobile-hud-layout.mobile-hud-layout.is-lobby:not(.has-enlarged-type) .palace-footer{
 position:absolute!important;inset:auto 0 0!important;width:auto!important;grid-area:auto!important;
 }
 /* Command navigation made this a relative grid item, retaining the stage's 8px gutter. */
 html body .palace-stage.quiet-hud.mobile-hud-layout.mobile-hud-layout:not(.has-enlarged-type):not(.is-lobby):not(.is-room-result):has(.palace-command) .palace-footer{
 position:absolute!important;inset:auto 0 0!important;width:auto!important;grid-area:auto!important;
 }
}
