/* ==========================================================
   v179.9.82 — HOME SEAM + FRESH-STATE STABILITY
   Visual/root-canvas fix only. Existing Scorecard/editor geometry untouched.
   ========================================================== */

/* The installed iPhone PWA can expose a few safe-area pixels below the
   100dvh Home canvas. Extend the Home surface through that area instead of
   allowing the underlying white document canvas to show through. */
@media (max-width:760px){
  body.home-page,
  body.home-page .app-shell,
  body.home-page main,
  body.home-page .v97-home{
    height:calc(100dvh + env(safe-area-inset-bottom))!important;
    min-height:calc(100dvh + env(safe-area-inset-bottom))!important;
  }

  body.home-page .v97-home-inner{
    box-sizing:border-box!important;
    min-height:100%!important;
  }
}

/* Match the root/browser canvas to the visible lower edge of each Home
   theme. This removes the hard white strip if iOS paints beyond body. */
html:has(body.home-page.theme-default:not(.dark-mode):not([data-theme-family="wrigley"])){
  background:#dedfe2!important;
}
body.home-page.theme-default:not(.dark-mode):not([data-theme-family="wrigley"]),
body.home-page.theme-default:not(.dark-mode):not([data-theme-family="wrigley"]) .app-shell,
body.home-page.theme-default:not(.dark-mode):not([data-theme-family="wrigley"]) main{
  background:#dedfe2!important;
}

html:has(body.home-page.theme-default.dark-mode){background:#151618!important;}
body.home-page.theme-default.dark-mode,
body.home-page.theme-default.dark-mode .app-shell,
body.home-page.theme-default.dark-mode main{background:#151618!important;}

html:has(body.home-page[data-theme-family="wrigley"]){background:#063528!important;}
body.home-page[data-theme-family="wrigley"],
body.home-page[data-theme-family="wrigley"] .app-shell,
body.home-page[data-theme-family="wrigley"] main{background:var(--wr-green-950,#063528)!important;}

/* Keep the actual Home artwork in charge of the visible canvas. The root
   colors above are only a continuation behind/below it. */
body.home-page .v97-home{position:relative!important;}
