/* Site-wide performance — smoother paint & input response */
* {
  -webkit-tap-highlight-color: transparent;
}
html {
  scroll-behavior: smooth;
  text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Faster interactions */
a, button, .btn, .nav-link, .gb-side-link, .exp-btn, input, select, textarea {
  touch-action: manipulation;
}

/* Contain paint for heavy regions */
.card, .feature-card, .neon-border, .table-wrap, .admin-sidebar {
  contain: layout style;
}
.gb-sidebar, .mobile-bottom-nav, .site-header {
  contain: layout paint;
}

img, video, iframe {
  max-width: 100%;
  height: auto;
}
img[loading="lazy"] {
  content-visibility: auto;
}

/* Labs canvas — high refresh, never collapse */
#lab-canvas {
  transform: translateZ(0);
  backface-visibility: hidden;
  contain: paint;
  content-visibility: auto;
}

/* Avoid layout thrash on common UI */
.site-header, .admin-layout {
  transform: translateZ(0);
}
