/* Mobile repair pass. Loaded after app CSS, scoped to phone widths only. */
@media (max-width: 768px) {
  html,
  body {
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: auto;
    touch-action: pan-y;
  }

  body.mobile-menu-open,
  body.drawer-open,
  body.menu-open,
  body.is-menu-open {
    position: static !important;
    overflow: auto !important;
  }

  #root {
    overflow-x: clip;
  }

  header,
  header * {
    pointer-events: auto;
  }

  header button,
  header a,
  .mobile-nav button,
  .mobile-nav a {
    touch-action: manipulation;
  }

  .header-case-dropdown,
  .header-product-dropdown,
  .case-index-panel,
  .product-index-panel,
  .mobile-nav-drawer,
  .nav-drawer,
  .header-drawer,
  .header-mega-panel,
  .header-dropdown,
  .mega-menu,
  .mega-panel {
    position: fixed !important;
    top: 50px !important;
    left: 10px !important;
    right: 10px !important;
    width: auto !important;
    max-width: none !important;
    max-height: min(68vh, 480px) !important;
    overflow-y: auto !important;
    transform: none !important;
    padding: 12px !important;
    border-radius: 16px !important;
    z-index: 150 !important;
  }

  .header-case-dropdown h2,
  .header-product-dropdown h2,
  .case-index-panel h2,
  .product-index-panel h2,
  .mobile-nav-drawer h2,
  .nav-drawer h2,
  .header-drawer h2,
  .header-mega-panel h2,
  .header-dropdown h2,
  .mega-menu h2,
  .mega-panel h2 {
    font-size: 24px !important;
    line-height: 1.08 !important;
    margin-bottom: 10px !important;
  }

  .header-case-dropdown article,
  .header-product-dropdown article,
  .case-index-panel article,
  .product-index-panel article,
  .mobile-nav-drawer article,
  .nav-drawer article,
  .header-drawer article,
  .header-mega-panel article,
  .header-dropdown article,
  .mega-menu article,
  .mega-panel article {
    min-height: 54px !important;
    padding: 10px 12px !important;
  }

  #projects .project-case-tags,
  #projects .case-tags,
  #featured .apple-product-center__tags,
  .apple-product-center__tags,
  .project-tags,
  .case-tags,
  .mobile-case-tags {
    display: none !important;
  }

  .mobile-product-carousel,
  .apple-product-center__gallery,
  .apple-product-center__gallery-track,
  .product-sample-grid,
  .product-root-page__groups,
  .product-root-page__sample-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 10px !important;
    align-items: end !important;
    padding-inline: 12px !important;
    overflow: visible !important;
  }

  .mobile-product-carousel article,
  .apple-product-center__gallery article,
  .apple-product-center__gallery-track article,
  .product-sample-grid article,
  .product-root-page__groups article,
  .product-root-page__sample-grid article {
    min-width: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    transform: none !important;
  }

  .mobile-product-carousel img,
  .apple-product-center__gallery img,
  .apple-product-center__gallery-track img,
  .product-sample-grid img,
  .product-root-page__groups img,
  .product-root-page__sample-grid img {
    width: 100% !important;
    height: 118px !important;
    object-fit: contain !important;
  }

  .mobile-product-carousel h3,
  .apple-product-center__gallery h3,
  .apple-product-center__gallery-track h3,
  .product-sample-grid h3,
  .product-root-page__groups h3,
  .product-root-page__sample-grid h3 {
    margin: 0 0 8px !important;
    font-size: 11px !important;
    line-height: 1.25 !important;
    text-align: center !important;
  }

  .advantages-grid,
  .advantages-section__grid,
  .capabilities-grid {
    display: flex !important;
    overflow-x: auto !important;
    gap: 14px !important;
    padding: 0 16px 8px !important;
    scroll-snap-type: x proximity;
  }

  .advantages-grid > *,
  .advantages-section__grid > *,
  .capabilities-grid > * {
    flex: 0 0 54vw !important;
    min-height: auto !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    scroll-snap-align: start;
  }

  .process-steps,
  .process-section__steps,
  .process-grid {
    display: flex !important;
    overflow-x: auto !important;
    gap: 12px !important;
    padding: 0 16px 8px !important;
  }

  .process-steps > *,
  .process-section__steps > *,
  .process-grid > * {
    flex: 0 0 112px !important;
    min-width: 112px !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
  }

  .floating-contact-actions {
    position: fixed !important;
    right: 8px !important;
    bottom: 74px !important;
    z-index: 90 !important;
    gap: 8px !important;
    pointer-events: auto !important;
  }

  .floating-contact-actions__item {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    padding: 0 !important;
    border-radius: 999px !important;
    overflow: hidden !important;
    display: grid !important;
    place-items: center !important;
  }

  .floating-contact-actions__item span,
  .floating-contact-actions__item strong,
  .floating-contact-actions__item small,
  .floating-contact-actions__item p,
  .floating-contact-actions__copy,
  .floating-contact-actions__status {
    display: none !important;
  }

  .floating-contact-actions__item svg,
  .floating-contact-actions__item img {
    width: 18px !important;
    height: 18px !important;
  }

  .scroll-reveal-item,
  .hero-reveal {
    transition-duration: 320ms !important;
  }
}
