/* Paint the iPhone system inset with the page chrome, never the ivory content. */
html{
  --buna-safe-top:env(safe-area-inset-top,0px);
  --buna-safe-right:env(safe-area-inset-right,0px);
  --buna-safe-bottom:env(safe-area-inset-bottom,0px);
  --buna-safe-left:env(safe-area-inset-left,0px);
  background:#101510;
  scroll-padding-top:calc(84px + var(--buna-safe-top));
}
html:has(#production-loading){background:#111111}
body{padding-left:var(--buna-safe-left);padding-right:var(--buna-safe-right)}
html body.ritual-shell>header{
  height:calc(84px + var(--buna-safe-top))!important;
  min-height:calc(84px + var(--buna-safe-top))!important;
  padding-top:calc(12px + var(--buna-safe-top))!important;
}
html body.ritual-shell>footer.buna-site-footer{
  padding-bottom:calc(40px + var(--buna-safe-bottom));
}
#production-loading .loading-main{
  padding-top:max(24px,var(--buna-safe-top));
  padding-right:max(24px,var(--buna-safe-right));
  padding-bottom:max(24px,var(--buna-safe-bottom));
  padding-left:max(24px,var(--buna-safe-left));
}
@media(max-width:700px){
  html{scroll-padding-top:calc(128px + var(--buna-safe-top))}
  html body.ritual-shell>header{
    height:calc(128px + var(--buna-safe-top))!important;
    min-height:calc(128px + var(--buna-safe-top))!important;
  }
}
@media(pointer:coarse){
  html body.ritual-shell>header{background:#101510!important}
}
/* E139: Safari may fall back to BODY when a backdrop-filtered header isn't sampled.
   Keep the browser canvas dark; the content owns its original ivory surface. */
html body{background:#101510!important}
html:has(#production-loading) body{background:#111111!important}
html body>main{background:var(--ivory,#f3efe5)}
html body.view-methods:not(.nb-open)>main{background:#101d14}
@media(pointer:coarse),(hover:none){
  html body.ritual-shell>header{
    background:#101510!important;
    backdrop-filter:none!important;
    -webkit-backdrop-filter:none!important;
  }
}
