/* Native-only layout and performance corrections loaded by the Capacitor shell.
   The `native-android` class is attached to <html> by Index.tsx. */

.native-android .compact-landscape-header {
  padding-top: max(3.5rem, env(safe-area-inset-top, 0px)) !important;
  padding-left: max(0.75rem, env(safe-area-inset-left, 0px)) !important;
  padding-right: max(0.75rem, env(safe-area-inset-right, 0px)) !important;
}

.native-android .mission-home-button {
  top: max(3.75rem, calc(env(safe-area-inset-top, 0px) + 1rem)) !important;
  left: max(0.75rem, env(safe-area-inset-left, 0px)) !important;
}

/* Android WebView can become visibly janky when many translucent cards apply
   live backdrop filters while Framer Motion is also animating. The native app
   uses the same translucent backgrounds without the expensive blur pass. */
.native-android [class*="backdrop-blur"] {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

.native-android .transition-all,
.native-android .transition-colors,
.native-android .transition-transform,
.native-android .transition-opacity {
  transition-duration: 90ms !important;
}

/* Decorative CSS loops are intentionally simplified on Android. Framer Motion
   also runs in reduced-motion mode there, leaving interaction feedback intact. */
.native-android .animate-swing,
.native-android .animate-bounce-slow,
.native-android .animate-pulse-neon,
.native-android .animate-float,
.native-android .animate-spin-slow {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
}

.native-android,
.native-android body {
  scroll-behavior: auto !important;
}

/* Short landscape phones need less vertical reserve because the status bar is
   shallower, while still keeping controls away from the system chrome. */
@media (orientation: landscape) and (max-height: 520px) {
  .native-android .compact-landscape-header {
    padding-top: max(2.75rem, env(safe-area-inset-top, 0px)) !important;
  }

  .native-android .mission-home-button {
    top: max(3rem, calc(env(safe-area-inset-top, 0px) + 0.75rem)) !important;
  }
}
