/* sticky.css v3 (2026-09-15): iOS Safari fixes. Loaded on EVERY prof2 page AFTER prof2.css / site.css / navpop.css
   (same specificity + later source order wins, so nothing here needs to be duplicated in the per-page <style> blocks).

   1) STICKY BAR + LOGO POP-IN. Legacy -webkit-sticky alias, and on phones (<=1000px) html/body drop overflow-x:clip:
      WebKit makes a clipped html/body the sticky element's scroll container in some iOS builds (the same failure mode as
      overflow-x:hidden), so .topbar/header.site never stuck and the IntersectionObserver .stuck state never showed.
      Every one of the 53 pages was measured at 390x844 and 844x390 with clipping disabled: 0px horizontal overflow, so the
      clip is redundant on phones (desktop keeps it).
   2) NOTCH / SAFE AREA. All pages now use viewport-fit=cover. The master bar pads the status bar with its own background,
      the sticky bar sits below the status bar, and a fixed strip (::before on the master bar, background:inherit) keeps the
      canvas continuous behind the clock; it takes the sticky bar's colour once .stuck. MENU tab, drop-down, division flap,
      side pop, category tab and cart badge honour env() so nothing hides under the status bar, notch or Safari's collapsed
      landscape toolbar. */
.topbar,header.site{position:-webkit-sticky;position:sticky}
@media(max-width:1000px){
  html,body{overflow-x:visible}
  body{padding-left:env(safe-area-inset-left,0px);padding-right:env(safe-area-inset-right,0px)}
  /* master bar owns the status-bar band */
  .mastertop,.ljp-mastertop{position:relative;padding-top:env(safe-area-inset-top,0px)}
  .mastertop::before,.ljp-mastertop::before{content:"";position:fixed;top:0;left:0;right:0;height:env(safe-area-inset-top,0px);background:inherit;border:0;z-index:59;pointer-events:none}
  body:has(.topbar.stuck) .mastertop::before{background:var(--canvas,#f3f3f1)}
  body:has(header.site.stuck) .ljp-mastertop::before{background:rgba(250,247,241,.88);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}
  /* sticky bar sticks just under the status bar */
  .topbar,header.site{top:env(safe-area-inset-top,0px)}
  /* MENU tab hangs from the safe-area edge; drop-down follows it */
  button.mt-navfab,button.ljp-mt-navfab{top:env(safe-area-inset-top,0px) !important;right:calc(24px + env(safe-area-inset-right,0px)) !important}
  .mt-navpop,.ljp-mt-navpop{top:calc(56px + env(safe-area-inset-top,0px)) !important;right:calc(24px + env(safe-area-inset-right,0px)) !important;max-height:calc(100vh - 100px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px))}
  /* division flap + its pop, category tab, cart badge */
  html[data-division] .navfab{right:env(safe-area-inset-right,0px) !important}
  html[data-division] .navpop{right:calc(52px + env(safe-area-inset-right,0px)) !important}
  .catfab,#catFab{right:env(safe-area-inset-right,0px);bottom:calc(100px + env(safe-area-inset-bottom,0px))}
  .ljs-cartbadge{right:calc(24px + env(safe-area-inset-right,0px)) !important}
}
/* landscape phones: division flap sits a little higher so it can never meet the MENU drop-down, and the MENU tab stays
   above everything Safari might overlay */
@media(max-width:1000px) and (max-height:500px){
  button.mt-navfab,button.ljp-mt-navfab{z-index:240 !important}
  html[data-division] .navfab{top:56% !important}
}
