/* Franchise Portal V33.79 — single document scroll recovery
   Goal: one vertical page scrollbar on desktop/mobile app surfaces.
   Intentional modal/debug/table horizontal scrollers remain isolated. */
html{
  min-height:100%!important;
  height:auto!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  overscroll-behavior-y:auto!important;
  scrollbar-gutter:stable;
}
body{
  min-height:100vh!important;
  height:auto!important;
  /* `hidden` + `visible` computes the second axis to `auto`, which made both
     BODY and HTML vertical scroll owners. `clip` keeps horizontal paint
     contained without creating a second vertical scrolling box. */
  overflow-x:clip!important;
  overflow-y:visible!important;
  overscroll-behavior-y:auto!important;
  touch-action:pan-y!important;
}

/* Trade Centre: remove viewport-within-viewport scrolling. */
body .page{
  height:auto!important;
  min-height:100vh!important;
  overflow:visible!important;
}
body .page>.main,
body .main{
  height:auto!important;
  min-height:0!important;
  align-items:start!important;
  overflow:visible!important;
}
body .panel{max-height:none!important;overflow:visible!important;}
body .panel-body,
body #workspace.panel-body{
  height:auto!important;
  max-height:none!important;
  min-height:0!important;
  overflow:visible!important;
}
body .team-list,
body #workspace .team-list,
body .scroll-list,
body .builder-side .scroll-list,
body .v2785-player-list{
  height:auto!important;
  max-height:none!important;
  min-height:0!important;
  overflow:visible!important;
  overscroll-behavior:auto!important;
  scrollbar-gutter:auto!important;
}

/* Salary Workspace: page owns vertical motion; workspace modules expand naturally. */
body .salary-room{
  width:100%!important;
  height:auto!important;
  min-height:100vh!important;
  overflow:visible!important;
  padding-bottom:120px!important;
}
body .salary-room>.workspace,
body .salary-room .workspace{
  position:relative!important;
  inset:auto!important;
  left:auto!important;
  right:auto!important;
  top:auto!important;
  width:min(88vw,1600px)!important;
  height:auto!important;
  min-height:0!important;
  margin:clamp(130px,15vh,190px) auto 60px!important;
  overflow:visible!important;
}
body .salary-room .screen-grid{
  height:auto!important;
  min-height:0!important;
  overflow:visible!important;
}
body .salary-room .module{
  min-height:0!important;
  height:auto!important;
  overflow:visible!important;
}
body .salary-room .module .live-list,
body .salary-room .focus-only-list,
body .salary-room .cap-sim-list,
body .salary-room .pick-strip{
  height:auto!important;
  max-height:none!important;
  overflow:visible!important;
}
body .salary-room .contract-table-wrap{
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
}

/* Stats/Draft lists grow with the page. Keep table horizontal overflow only. */
body .table-wrap,
body #draftCapitalGrid{
  height:auto!important;
  max-height:none!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
}
body .prospects,
body .gm-exec-dashboard{
  height:auto!important;
  max-height:none!important;
  overflow:visible!important;
}

/* Fixed visual rooms can stay viewport-sized, but the document must remain the wheel owner. */
body .hq{overflow:hidden!important;}
body .scouting-room{min-height:100vh!important;overflow:visible!important;}

/* Do not flatten intentional overlays/dialogs. */
body.modal-open,
body.fp-modal-open{overflow:hidden!important;}
.modal-body,.drawer-body,.phone-panel,.draft-modal-body,.v2779-modal-card,.v2781-modal-card,.v2785-modal-card,.v2824-card pre,
pre.debug-box{
  overscroll-behavior:contain;
}

@media(max-width:1200px){
  body .page>.main,body .main{height:auto!important;}
  body .salary-room>.workspace,body .salary-room .workspace{width:94vw!important;margin-top:120px!important;}
}

/* Remaining persistent page sections: grow instead of creating a second wheel target. */
body .leagues,
body .league-details p,
body .rules-preview p,
body .draft-preview,
body .import-wrap{
  height:auto!important;
  max-height:none!important;
  overflow:visible!important;
  overscroll-behavior:auto!important;
}


/* V33.80: flatten remaining persistent, non-modal vertical scroll wells. */
body .v2783-inline-intel-body,
body .league-grid,
body .ownership-table,
body .team-grid,
body .health-grid,
body .data-grid{
  max-height:none!important;
  height:auto!important;
  overflow-y:visible!important;
}
