/*
 * HAWK-EYE global mobile scrolling/overflow audit.
 * Prevent accidental page-level sideways movement while preserving deliberate
 * local scrollers such as the League matrix and Workshop robot selector.
 */
@media (max-width: 767px), (hover: none) and (pointer: coarse) {
  html,
  body,
  #root {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    overscroll-behavior-x: none;
  }

  main,
  main > div,
  .panel,
  .panel-light {
    min-width: 0;
  }

  .panel,
  .panel-light {
    max-width: 100%;
  }

  /* Intentional horizontal surfaces own their gesture instead of moving the page. */
  .overflow-x-auto,
  .overflow-x-scroll {
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
  }

  /*
   * Workshop's command deck is part of the main page, not a modal. On touch,
   * let the page own vertical scrolling instead of trapping a second scroll area.
   * The Part Picker remains internally scrollable by design.
   */
  main:has(button.btn-ghost[title*="slot"]) div[class*="max-h-[70vh]"][class*="overflow-y-auto"] {
    max-height: none !important;
    overflow-y: visible !important;
  }
}
