/* R695 emergency main-thread and scroll stability layer. Loaded last. */
html,
body {
  scroll-behavior: auto !important;
  overscroll-behavior-y: none;
}

/* Disable decorative GPU layers that repaint during every scroll frame. */
.billion-ambient,
.billion-scroll-progress,
.r119-ambient,
.r119-grain,
.r119-page-grain,
.r120-orb,
.billion-orb,
.canva-ambient,
.luxury-floating-chip,
.r119-cinematic::before,
.r119-cinematic::after,
.canva-hero::after,
.r119-kpi-card::before,
.r119-kpi-card::after {
  display: none !important;
  animation: none !important;
  filter: none !important;
}

/* Solid surfaces avoid costly backdrop recomposition on the M1 integrated GPU. */
.app-header,
.section-nav,
.r119-bottom-dock,
.r119-dock-inner,
.r119-command-panel,
.r119-command-overlay,
.card,
.workspace-card,
.approval-panel,
.approval-product-card,
.batch-product-card,
.product-history-card,
.catalog-search-result,
.catalog-database-row,
.status,
.panel,
.sticky,
aside .sticky {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  filter: none !important;
  background-image: none !important;
}

.r119-dock-inner,
.app-header,
.section-nav {
  box-shadow: 0 2px 10px rgba(20, 18, 28, .10) !important;
}

/* Do not lay out or paint off-screen product cards. R497 previously forced every
   card to stay painted, which multiplied scroll cost as the approval/history DOM grew. */
#automationApprovalList > .approval-product-card,
#batchResultsList > .batch-product-card,
.product-history-list > .product-history-card,
#catalogSearchResults > .catalog-search-result,
#catalogDatabaseViewer > .catalog-database-row {
  content-visibility: auto !important;
  contain: layout paint style !important;
  contain-intrinsic-size: 420px 980px !important;
}

/* While the trackpad is moving, temporarily remove nonessential fixed layers and
   hover effects so Chrome only has to composite the document being scrolled. */
body.r695-scrolling .r119-bottom-dock,
body.r695-scrolling .luxury-floating-chip,
body.r695-scrolling .billion-scroll-progress {
  visibility: hidden !important;
}
body.r695-scrolling *,
html.r695-performance-mode * {
  animation: none !important;
  transition-duration: 0s !important;
}
body.r695-scrolling .card,
body.r695-scrolling .workspace-card,
body.r695-scrolling .approval-product-card,
body.r695-scrolling .batch-product-card,
body.r695-scrolling .product-history-card,
body.r695-scrolling button {
  box-shadow: none !important;
}

/* Prevent enormous hidden detail panels from participating in layout work until
   the user opens them. */
details:not([open]) > :not(summary) {
  display: none !important;
}

/* Large tables and galleries are contained so a live update cannot invalidate the
   whole page. */
.table-wrap,
.batch-image-gallery,
.batch-live-image-tracker,
.buyer-pdf-live-timing,
.buyer-pdf-process-breakdown,
.generation-sheet-card,
.approval-product-build-body {
  contain: layout paint style !important;
}

/* Stable image sizing reduces repeated layout shifts while previews arrive. */
img {
  content-visibility: auto;
  contain-intrinsic-size: 320px 320px;
}

@media (max-width: 1100px) {
  .r119-bottom-dock { display: none !important; }
}
