/* MoneyBuddy v68.31: desktop scrolling and lightweight page changes. */
@media (min-width: 768px) {
  /* Only the document scrolls; never capture wheel on a non-scrolling body or feature shell. */
  html:has(body.mb-feature-view-open) {
    overflow-x:clip!important;
    overflow-y:auto!important;
    overscroll-behavior-y:auto!important;
    scroll-behavior:auto!important;
  }
  body.mb-feature-view-open {
    position:static!important;
    height:auto!important;
    max-height:none!important;
    overflow-x:clip!important;
    overflow-y:visible!important;
    overscroll-behavior:auto!important;
    touch-action:auto!important;
  }
  body.mb-feature-view-open #moneyBuddyFeatureLayer.is-open {
    display:block!important;
    position:relative!important;
    inset:auto!important;
    top:auto!important;right:auto!important;bottom:auto!important;left:auto!important;
    width:100%!important;height:auto!important;max-height:none!important;
    min-height:calc(100vh - 76px)!important;
    overflow:visible!important;
    overscroll-behavior:auto!important;
    touch-action:auto!important;
    z-index:1!important;
  }
  body.mb-feature-view-open #moneyBuddyFeatureContent {
    height:auto!important;
    min-height:0!important;
    overflow:visible!important;
    overscroll-behavior:auto!important;
  }
  /* The header stays visible without a full-area live blur operation during scrolling. */
  header.sticky, body > header {backdrop-filter:none!important;-webkit-backdrop-filter:none!important;}
  /* Continually floating a large layered flower repaints on every scroll frame.
     Watering, progress and Buddy reactions remain interactive. */
  #money-plant-section #plantSvgStage,
  #money-plant-section #plantSvgStage.money-flower-live-stage,
  #money-plant-section .plant-terrarium-stage {
    animation:none!important;
    will-change:auto!important;
  }
  /* Route changes should paint once, not cross-fade a multi-section page. */
  #moneyBuddyFeatureLayer.is-open .mb-feature-shell {animation:none!important;}
  /* Avoid expensive live backdrop sampling on decorative dashboard tiles. */
  #buddyHeroCard .backdrop-blur-sm, #buddyHeroCard .backdrop-blur-md,
  #moneyBuddyPulse .backdrop-blur-sm {backdrop-filter:none!important;-webkit-backdrop-filter:none!important;}
}
/* A genuine open dialog locks the page, not its inner scrolling content. */
html.mb-popup-open, body.mb-popup-open {overflow:hidden!important;overscroll-behavior:none!important;}
@media(min-width:768px){
 html.mb-popup-open:has(body.mb-feature-view-open),
 body.mb-feature-view-open.mb-popup-open {
  overflow:hidden!important;overscroll-behavior:none!important;
 }
}
