/* ==========================================================================
   INTERACTIVE 3D HERO CHARACTER (CROSS-DEVICE NATIVE HERO)
   Seamless Proportion-Locked 3D Hero (Directly Beneath Navigation Bar)
   ========================================================================== */

/* Base Section Styling: Pure seamless white canvas, edge-to-edge layout */
.mobile-gaze-section {
  position: relative !important;
  width: 100% !important;
  max-width: 100vw !important;
  min-height: auto !important;
  height: auto !important;
  max-height: none !important;
  margin: 0 !important;
  padding-top: 72px !important;
  padding-bottom: 24px !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  background-color: #ffffff !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  box-sizing: border-box !important;
  z-index: 20 !important;
  border: none !important;
  box-shadow: none !important;
}

/* Wrapper: Clean, unconstrained flexbox centering */
.mobile-gaze-wrapper {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  box-sizing: border-box !important;
  padding: 0 !important;
  margin: 0 auto !important;
}

/* Legacy headers, badges, and card borders completely removed */
.mobile-gaze-header {
  display: none !important;
}

/* Stage Container: Proportion-locked 504:850 without vertical stretching */
.mobile-gaze-stage-container {
  position: relative !important;
  aspect-ratio: 504 / 850 !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  margin: 0 auto !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background-color: #ffffff !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
  flex-shrink: 0 !important;
}

/* Desktop Viewport Sizing (>= 769px): Mobile Hero Hidden in favor of PC Widescreen Hero */
@media (min-width: 769px) {
  .mobile-gaze-section,
  #mobile-hero-interactive {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    overflow: hidden !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
}

/* Mobile & Touch Viewports (<= 768px) */
@media (max-width: 768px) {
  .mobile-gaze-section {
    padding-top: calc(54px + env(safe-area-inset-top, 0px)) !important;
    padding-bottom: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
    min-height: auto !important;
    height: auto !important;
    max-height: none !important;
    overflow: hidden !important;
  }

  .mobile-gaze-stage-container {
    aspect-ratio: 504 / 850 !important;
    width: 100% !important;
    max-width: 100vw !important;
    height: auto !important;
    margin: 0 auto !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background-color: #ffffff !important;
  }
}

/* Forced Mobile Mode (preview & simulators) */
html.mode-mobile .mobile-gaze-section,
body.mode-mobile .mobile-gaze-section {
  padding-top: calc(54px + env(safe-area-inset-top, 0px)) !important;
  padding-bottom: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin: 0 !important;
  width: 100% !important;
  max-width: 100vw !important;
  min-height: auto !important;
  height: auto !important;
  max-height: none !important;
  overflow: hidden !important;
}

html.mode-mobile .mobile-gaze-stage-container,
body.mode-mobile .mobile-gaze-stage-container {
  aspect-ratio: 504 / 850 !important;
  width: 100% !important;
  max-width: 100vw !important;
  height: auto !important;
  margin: 0 auto !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background-color: #ffffff !important;
}

/* --------------------------------------------------------------------------
   HARDWARE-ACCELERATED MEDIA ASSETS (FULL RESOLUTION CANVAS & POSTER)
   -------------------------------------------------------------------------- */
.mobile-gaze-asset {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  display: block;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

/* Base Idle Poster: Strictly aspect-ratio contained without elongation */
.mobile-gaze-poster {
  z-index: 1;
  object-fit: contain !important;
  object-position: center center !important;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  backface-visibility: hidden;
  transition: opacity 0.3s ease-out;
  background-color: #ffffff;
}

/* Interactive Sprite Sheet Canvas (Butter-Smooth 60/120fps) */
.mobile-gaze-canvas {
  z-index: 2;
  display: block;
  width: 100% !important;
  height: 100% !important;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  backface-visibility: hidden;
  will-change: contents;
  background-color: #ffffff;
}

/* Interaction Surface: Allows vertical page scrolling while tracking gestures */
.mobile-gaze-touch-surface {
  position: absolute;
  inset: 0;
  z-index: 10;
  cursor: default;
  touch-action: pan-y !important; /* CRITICAL: Enables natural vertical scrolling on touch devices! */
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}
