/* Homepage hero pagination. Same layer as the mobile rules it replaces,
   and loaded after the shared bundles so those long-cached files stay
   unchanged. Chinese and English home share these marks. */

@layer mobile-redesign {
  @media (min-width: 761px) {
    html body.home-page #home-hero.hero-carousel .hero-carousel-controls {
      bottom: max(40px, calc(28px + env(safe-area-inset-bottom))) !important;
      gap: 0 !important;
    }

    html body.home-page #home-hero.hero-carousel .hero-carousel-dots {
      align-items: center !important;
      gap: 8px !important;
    }

    html body.home-page #home-hero.hero-carousel .hero-carousel-dots button {
      width: 12px !important;
      height: 3px !important;
      min-width: 0 !important;
      min-height: 0 !important;
      padding: 0 !important;
      border: 0 !important;
      border-radius: 99px !important;
      background: rgba(255, 255, 255, 0.4) !important;
      box-shadow: none !important;
      opacity: 1 !important;
      transition: width 180ms ease, background-color 180ms ease !important;
    }

    html body.home-page #home-hero.hero-carousel .hero-carousel-dots button.is-active {
      width: 22px !important;
      border-color: transparent !important;
      background: rgba(255, 255, 255, 0.78) !important;
      opacity: 1 !important;
    }

    html body.home-page #home-hero.hero-carousel .hero-carousel-dots button::before {
      width: 100% !important;
      height: 28px !important;
      top: 50% !important;
      left: 0 !important;
      transform: translateY(-50%) !important;
    }
  }

  @media (max-width: 760px) {
    html body.home-page #home-hero.hero-carousel .hero-carousel-controls {
      bottom: calc(54px + env(safe-area-inset-bottom)) !important;
      align-items: flex-end !important;
    }

    html body.home-page #home-hero.hero-carousel .hero-carousel-dots {
      align-items: flex-end !important;
      gap: 6px !important;
    }

    html body.home-page #home-hero.hero-carousel .hero-carousel-dots button {
      width: 24px !important;
      height: 44px !important;
      min-width: 24px !important;
      min-height: 44px !important;
      padding: 0 !important;
      border: 0 !important;
      border-radius: 0 !important;
      background: transparent !important;
      box-shadow: none !important;
    }

    html body.home-page #home-hero.hero-carousel .hero-carousel-dots button::after {
      top: auto !important;
      right: auto !important;
      bottom: 0 !important;
      left: 50% !important;
      width: 12px !important;
      height: 3px !important;
      border: 0 !important;
      border-radius: 99px !important;
      transform: translateX(-50%) !important;
      background: rgba(255, 255, 255, 0.42) !important;
      box-shadow: none !important;
    }

    html body.home-page #home-hero.hero-carousel .hero-carousel-dots button.is-active::after {
      width: 20px !important;
      border: 0 !important;
      background: rgba(255, 255, 255, 0.8) !important;
    }

    html body.home-page #home-hero.hero-carousel .hero-carousel-dots button:focus-visible {
      outline: 2px solid rgba(255, 255, 255, 0.85) !important;
      outline-offset: -6px !important;
    }
  }

  @media (prefers-reduced-motion: reduce) {
    html body.home-page #home-hero.hero-carousel .hero-carousel-dots button,
    html body.home-page #home-hero.hero-carousel .hero-carousel-dots button::after {
      transition: none !important;
    }
  }
}
