/* v166: pin the floating tab bar + Andrew button to a latched safe-area value so scrolling can't move them */
html.skin-new .tabbar { bottom: calc(10px + var(--sab, env(safe-area-inset-bottom, 0px))) !important; transition: opacity .3s !important; }
html.skin-new .tabbar:not(.hidden) { transform: translate3d(0, 0, 0) !important; }
#apAsk { bottom: calc(14px + var(--sab, env(safe-area-inset-bottom, 0px))) !important; transform: translate3d(0, 0, 0); }

/* v474: profile-installed app = solid black iOS status bar, page starts UNDER it (safe-area top = 0).
   The 59px Dynamic-Island clearance then left an empty band below the bar — drop it so the header sits right under. */
html.buff-solid-sb { --buff-top-clearance: 6px !important; }
html.buff-solid-sb, html.buff-solid-sb body { background-color: #000 !important; }
html.buff-solid-sb body::after { content: ""; position: fixed; left: 0; right: 0; top: 0; height: 28px; z-index: 39; pointer-events: none; background: linear-gradient(180deg, #000, rgba(0,0,0,0)); }

/* v476: full-screen home-screen app (page runs under the clock). iOS 26 blurs whatever sits in the top band
   under the status bar, which smeared the "AI · today" row. Start the header just below that band. */
html.buff-standalone:not(.buff-solid-sb) { --buff-top-clearance: calc(max(env(safe-area-inset-top, 0px), 59px) + 26px) !important; }

/* v479: scrolled top bar — full blur to just under the menu pill, then a short ~28px ease-out
    (no hard line, nothing sharp right under the pill). The bar's own hairline/background are off. */
html.skin-new .topbar.scrolled { background: transparent !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; border-bottom-color: transparent !important; }
html.skin-new .topbar::before { content: ""; position: absolute; left: 0; right: 0; top: 0; bottom: -28px; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,.74) 0%, rgba(0,0,0,.6) calc(100% - 26px), rgba(0,0,0,0) 100%);
  -webkit-backdrop-filter: blur(32px) saturate(170%); backdrop-filter: blur(32px) saturate(170%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 calc(100% - 24px), rgba(0,0,0,.7) calc(100% - 16px), rgba(0,0,0,.35) calc(100% - 8px), transparent 100%);
  mask-image: linear-gradient(180deg, #000 0%, #000 calc(100% - 24px), rgba(0,0,0,.7) calc(100% - 16px), rgba(0,0,0,.35) calc(100% - 8px), transparent 100%);
  opacity: 0; transition: opacity .3s; }
html.skin-new .topbar.scrolled::before { opacity: 1; }
