/* The actual sticky box must span the mobile viewport so Safari can
   recognize an opaque top-edge surface for its toolbar color extension.
   Keep every reading control at its original 24px content inset.
   Do not add a header/safe-area offset, force fixed positioning or change
   viewport-fit. Desktop, print, anchors and hide/show behavior stay native. */
@media screen and (max-width:760px) {
  .edition-reading-navigation[data-reading-navigation],
  body:has(.w-reading) .w-reading > .w-toc {
    box-sizing:border-box;
    width:calc(100% + 48px);
    max-width:none;
    margin-inline:-24px;
    padding-inline:24px;
    background:var(--canvas,#fafaf8);
    -webkit-backdrop-filter:none;
    backdrop-filter:none;
  }
  /* Cancel the unsuccessful paint-only attempt if a stale import is present. */
  .edition-reading-navigation[data-reading-top-fill]::before,
  body:has(.w-reading) .w-toc[data-reading-top-fill]::before {
    content:none;
  }
}
