/*
 * WikiStore v4.9.690 — render stability / no scroll-reveal flash.
 * Goal: paint the full page once, avoid below-the-fold reveal flicker, and
 * reduce iOS/Safari repaint pressure from fixed glass layers while scrolling.
 */

/* Never keep normal page content invisible waiting for IntersectionObserver. */
.sx-reveal,
.sx-reveal.visible,
html.ws-motion-enabled .ws-motion-reveal,
html.ws-motion-enabled .ws-motion-reveal.is-visible{
  opacity:1!important;
  visibility:visible!important;
  transform:none!important;
  filter:none!important;
  transition:none!important;
}

/* Entry/page reveal animations are decorative; they caused visible repainting
   when long pages were scrolled into view or restored from bfcache. */
.ws-motion-mounted :where(.sx-home-main,.sx-multipage-workspace .page,.sx-admin-editor,.auth-stage,.sx-public-profile-shell,.ws404-shell,.sx-maintenance-shell),
.sx-admin-editor .admin-shell>*,
.sx-ui-enter :where(.sx-home-main,.sx-multipage-pane,.admin-shell,.auth-shell){
  animation:none!important;
}


/* Commerce-specific entry animations also used opacity from 0. Keep cards and
   the market page fully painted instead of animating them into existence. */
body.sx-multipage-workspace.ws-page-enter main.page#wsMainPage,
body.sx-multipage-workspace[data-sx-page="market"] .ws-soft-inventory-reveal{
  animation:none!important;
  opacity:1!important;
  transform:none!important;
}

/* Decorative loaders must never cover an already server-rendered page. */
.sx39-admin-loader,
.sx-entry-loader,
.sx-guard-loader{
  display:none!important;
  visibility:hidden!important;
  opacity:0!important;
  pointer-events:none!important;
}

/* Route fades made fast navigation look like a flash. Native navigation stays
   immediate; the thin progress indicator may still be used by other modules. */
.sx-route-native :where(.sx-home-main,.page,.admin-shell,.auth-shell,.sx-public-profile-shell,.ws404-shell,.sx-maintenance-shell),
.sx-route-leave .sx-admin-editor,
.sx-route-leave .sx-admin-explorer,
.sx-page-leave :where(.sx-home-main,.sx-main,.admin-shell,.auth-shell){
  opacity:1!important;
  transform:none!important;
  filter:none!important;
}

/* Avoid late browser paint-skipping rules on the commerce surfaces. */
body.sx-multipage-workspace :where(.sx-multipage-pane,.page,.sx-market-panel,.sx150-panel,.ws-shared-history,.ws-account-tier-card),
body.sx-admin-ide :where(.admin-shell,.admin-card,.sx636-order-frame){
  content-visibility:visible!important;
}

/* Stable media boxes: decoding may finish later, but geometry should not jump. */
img{
  image-rendering:auto;
}

html,body{
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  text-rendering:optimizeLegibility;
}

/* On touch devices the combination of large backdrop-filter layers + fixed
   navigation is a common source of Safari scroll shimmer. Keep the same dark
   surfaces but let the GPU composite opaque/translucent fills instead of live
   blurring the page on every scroll frame. */
@media (max-width:900px){
  html,body{scroll-behavior:auto!important}

  body.sx-multipage-workspace :where(
    .sx-mobile-bottomnav,
    .sx-public-topbar,
    .sx-sidebar,
    .sx-mobile-backdrop,
    .ws-user-menu,
    .ws-search-box,
    .ws-account-toast,
    .sx-market-rate-hotbar,
    .sx120-rate-hotbar,
    .admin-commandbar
  ),
  body.sx-admin-ide :where(
    .sx-admin-titlebar,
    .sx-admin-explorer,
    .sx-admin-mobile-bottomnav,
    .sx-mobile-scrim,
    .admin-commandbar,
    .sx39-command-palette
  ){
    -webkit-backdrop-filter:none!important;
    backdrop-filter:none!important;
  }

  /* Ambient/decorative animation does not need to repaint while the finger is
     moving. It resumes as soon as scrolling settles. */
  html.ws-scroll-active .ws-motion-ambient{display:none!important}
  html.ws-scroll-active :where(
    .sx-status-dot,
    .sx-sidebar-progress>i,
    .rank-progress>i,
    .sx-public-profile-hero-progress>i,
    .sx-progress>i,
    .progress>i
  ){
    animation-play-state:paused!important;
  }
}

@media (prefers-reduced-motion:reduce){
  .sx-reveal,
  .ws-motion-reveal,
  .sx-admin-editor .admin-shell>*{
    animation:none!important;
    transition:none!important;
  }
}
