/* R703 restores the original visual design while removing only the causes of
   text shimmer, reflow flicker, and GPU-heavy continuous repainting. */
html, body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-synthesis: none;
  scroll-behavior: auto !important;
}

/* Keep the original colors, gradients, borders, and card surfaces. Only motion is
   suppressed, so text no longer pulses or shifts between competing theme layers. */
*, *::before, *::after {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
  scroll-behavior: auto !important;
}

/* Remove continuously composited decoration without changing any content color. */
.r119-ambient,
.r119-grain,
.r119-page-grain,
.billion-ambient,
.billion-scroll-progress,
.canva-ambient,
.luxury-floating-chip,
.r120-orb,
.billion-orb {
  display: none !important;
  animation: none !important;
}

/* Backdrop blur on fixed chrome causes glyph shimmer during scrolling on integrated
   GPUs. Preserve the original background and text colors while removing only blur. */
.app-header,
.section-nav,
.r119-bottom-dock,
.r119-dock-inner,
.r119-command-panel,
.r119-command-overlay {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

/* Previous emergency styles virtualized whole text-rich cards. Chrome can repaint
   those cards while scrolling, making letters disappear, flash, or look distorted.
   Keep text cards fully laid out and use containment only for image-heavy regions. */
.approval-product-card,
.batch-product-card,
.product-history-card,
.catalog-search-result,
.catalog-database-row,
.card,
.workspace-card,
.status {
  content-visibility: visible !important;
  contain: none !important;
  opacity: 1;
  filter: none;
}

.batch-image-gallery,
.batch-live-preview-strip,
.generation-sheet-card,
.buyer-pdf-live-timing,
.buyer-pdf-process-breakdown {
  contain: paint !important;
}

img, video, canvas {
  content-visibility: visible !important;
  contain-intrinsic-size: auto !important;
}

/* Keep manual-save copy from changing header width. */
#autosaveStatus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 148px;
  white-space: nowrap;
}

/* R696 JavaScript still switches to compact product cards during a live run. Style
   those cards without hiding the rest of the page or altering normal typography. */
#r696RuntimeBanner {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2147483000;
  width: min(760px, calc(100vw - 28px));
  padding: 12px 16px;
  border: 1px solid rgba(74,60,120,.24);
  border-radius: 16px;
  background: var(--surface, #fff);
  box-shadow: 0 6px 22px rgba(20,18,28,.16);
  display: grid;
  gap: 2px;
  pointer-events: none;
}
#r696RuntimeBanner[hidden] { display: none !important; }
.r696-approval-suspended,
.r696-compact-batch-card {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid rgba(90,80,130,.18);
  border-radius: 16px;
  background: var(--surface, #fff);
  box-shadow: none !important;
}
.r696-compact-batch-card > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.r696-compact-batch-card strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.r696-compact-progress {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(90,80,130,.12);
}
.r696-compact-progress > span {
  display: block;
  height: 100%;
  background: currentColor;
}

/* Avoid disabled-state opacity being inherited by large parent panels. */
.catalog-product-metric-filters:disabled,
.catalog-finder-metric-filters:disabled,
.catalog-database-panel:disabled,
fieldset:disabled {
  opacity: 1 !important;
  filter: none !important;
}

@media (prefers-color-scheme: dark) {
  #r696RuntimeBanner,
  .r696-approval-suspended,
  .r696-compact-batch-card {
    background: #171920;
  }
}
