/* LRMP-0.2.0A.1 — PAGE BOTTOM / FOOTER LAYOUT HOTFIX
   Scope: presentation only. No gameplay, network or platform logic.
   Goal: prevent bottom clipping on short/medium-height desktop viewports,
   give RANKED / CONTROLS enough breathing room, preserve mobile safe areas. */

#intro.screen{
  box-sizing:border-box!important;
  padding-bottom:max(42px, env(safe-area-inset-bottom, 0px))!important;
  scroll-padding-bottom:max(84px, calc(env(safe-area-inset-bottom, 0px) + 48px))!important;
  overscroll-behavior-y:contain;
  scrollbar-gutter:stable;
}

/* Keep the shell inside the normal document flow and leave a visible
   closing margin below its border on every viewport height. */
#intro.screen .lr-total-rebuild-0110{
  margin-bottom:max(64px, calc(env(safe-area-inset-bottom, 0px) + 44px))!important;
}

/* Content may grow naturally; the footer must never visually cover it. */
.lr-platform-foundation-020a1 .lr-command-body{
  min-height:0!important;
  overflow:visible!important;
}

.lr-platform-foundation-020a1 .lr-pane.active{
  position:relative;
  box-sizing:border-box;
  padding-bottom:clamp(30px, 4vh, 58px);
}

/* PLAY already contains full-width blocks with their own bottom rhythm. */
.lr-platform-foundation-020a1 .lr-pane[data-pane-content="play"].active{
  padding-bottom:36px;
}

/* RANKED was the easiest pane to look truncated because its rule cards end
   almost directly against the footer. */
.lr-platform-foundation-020a1 .lr-pane[data-pane-content="ranked"] .lr-ranking-rules{
  margin-bottom:clamp(42px, 6vh, 76px)!important;
}

/* CONTROLS can expand vertically after rebinding; never clip the runtime. */
.lr-platform-foundation-020a1 #lrControlsMount{
  box-sizing:border-box;
  padding-bottom:clamp(48px, 7vh, 88px)!important;
  overflow:visible!important;
}

.lr-platform-foundation-020a1 #lrControlsMount .lr-controls-embedded,
.lr-platform-foundation-020a1 #lrControlsMount .controls-list{
  max-height:none!important;
  overflow:visible!important;
}

/* Footer remains a normal closing block, with enough internal height that
   text cannot be visually cut by the shell border. */
.lr-platform-foundation-020a1 .lr110-footer{
  position:relative;
  z-index:2;
  box-sizing:border-box;
  min-height:78px!important;
  padding-top:16px!important;
  padding-bottom:16px!important;
  margin-top:0!important;
  flex-shrink:0;
}

@media (max-height:820px) and (min-width:761px){
  #intro.screen{
    padding-bottom:56px!important;
  }
  #intro.screen .lr-total-rebuild-0110{
    margin-bottom:72px!important;
  }
  .lr-platform-foundation-020a1 .lr-pane.active{
    padding-bottom:52px;
  }
  .lr-platform-foundation-020a1 #lrControlsMount{
    padding-bottom:72px!important;
  }
}

@media (max-width:760px){
  #intro.screen{
    padding-bottom:max(34px, calc(env(safe-area-inset-bottom, 0px) + 22px))!important;
  }
  #intro.screen .lr-total-rebuild-0110{
    margin-bottom:max(48px, calc(env(safe-area-inset-bottom, 0px) + 30px))!important;
  }
  .lr-platform-foundation-020a1 .lr-pane.active{
    padding-bottom:34px;
  }
  .lr-platform-foundation-020a1 #lrControlsMount{
    padding-bottom:52px!important;
  }
  .lr-platform-foundation-020a1 .lr110-footer{
    min-height:0!important;
    padding:20px 18px max(22px, calc(env(safe-area-inset-bottom, 0px) + 16px))!important;
  }
}
