/*
 * Mobile Fixed Background Stability
 * Keeps a fixed image at one physical crop while mobile browser chrome
 * expands/collapses. Intentionally isolated from app.css.
 */
@media (max-width: 960px) {
  body.wedding-body .global-fixed-image-wrap {
    top: 0 !important;
    right: 0 !important;
    bottom: auto !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important; /* fallback */
    min-height: 100vh !important;
    max-height: none !important;
    transform: none !important;
    backface-visibility: visible !important;
    contain: none !important;
    overflow: hidden !important;
  }

  /* Modern mobile browsers: use the largest viewport, not the dynamic one.
     This prevents cover/object-fit from being recalculated when the address
     bar collapses or reappears during scroll. */
  @supports (height: 100lvh) {
    body.wedding-body .global-fixed-image-wrap {
      height: 100lvh !important;
      min-height: 100lvh !important;
    }
  }

  body.wedding-body .global-fixed-image-wrap > img {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    bottom: auto !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important; /* fallback */
    min-width: 100vw !important;
    min-height: 100vh !important;
    max-width: none !important;
    max-height: none !important;
    transform: none !important;
    backface-visibility: visible !important;
  }

  @supports (height: 100lvh) {
    body.wedding-body .global-fixed-image-wrap > img {
      height: 100lvh !important;
      min-height: 100lvh !important;
    }
  }
}
