/* Final mobile reliability layer: stable Explore controls and memory media. */
@media (max-width: 720px), (hover: none) and (pointer: coarse) and (max-width: 1024px) {
  html body .app-shell .map-stage.map-focus .map-navigation-gadget,
  html body main.app-shell section.map-stage.map-focus .map-navigation-gadget {
    box-sizing: border-box !important;
    right: max(14px, env(safe-area-inset-right)) !important;
    bottom: calc(78px + env(safe-area-inset-bottom) + 20px) !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-template-rows: repeat(2, minmax(0, 1fr)) !important;
    gap: 0 !important;
    width: 88px !important;
    height: 88px !important;
    min-width: 88px !important;
    min-height: 88px !important;
    max-width: 88px !important;
    max-height: 88px !important;
    padding: 3px !important;
    overflow: hidden !important;
    border: 1px solid rgba(213, 248, 240, 0.34) !important;
    border-radius: 21px !important;
    background:
      radial-gradient(circle at 22% 0%, rgba(78, 222, 188, 0.18), transparent 48%),
      linear-gradient(145deg, rgba(5, 53, 66, 0.94), rgba(3, 31, 45, 0.92)) !important;
    box-shadow:
      0 16px 36px rgba(0, 21, 33, 0.28),
      inset 0 1px 0 rgba(255, 255, 255, 0.14) !important;
  }

  html body .app-shell .map-stage.map-focus .map-navigation-gadget > *,
  html body .app-shell .map-stage.map-focus .map-navigation-gadget #locateButton,
  html body .app-shell .map-stage.map-focus .map-navigation-gadget #mapZoomInButton,
  html body .app-shell .map-stage.map-focus .map-navigation-gadget #mapZoomOutButton,
  html body .app-shell .map-stage.map-focus .map-navigation-gadget .map-compass,
  html body main.app-shell section.map-stage.map-focus .map-navigation-gadget > * {
    position: relative !important;
    inset: auto !important;
    box-sizing: border-box !important;
    display: grid !important;
    place-items: center !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    color: #f7fffd !important;
    background: rgba(255, 255, 255, 0.075) !important;
    box-shadow: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
  }

  html body .app-shell .map-stage.map-focus .map-navigation-gadget #locateButton {
    grid-area: 1 / 1 !important;
    border-right: 1px solid rgba(218, 255, 246, 0.17) !important;
    border-bottom: 1px solid rgba(218, 255, 246, 0.17) !important;
    border-radius: 17px 0 0 !important;
  }

  html body .app-shell .map-stage.map-focus .map-navigation-gadget #mapZoomInButton {
    grid-area: 1 / 2 !important;
    border-bottom: 1px solid rgba(218, 255, 246, 0.17) !important;
    border-radius: 0 17px 0 0 !important;
  }

  html body .app-shell .map-stage.map-focus .map-navigation-gadget .map-compass {
    grid-area: 2 / 1 !important;
    border-right: 1px solid rgba(218, 255, 246, 0.17) !important;
    border-radius: 0 0 0 17px !important;
    pointer-events: none !important;
  }

  html body .app-shell .map-stage.map-focus .map-navigation-gadget #mapZoomOutButton {
    grid-area: 2 / 2 !important;
    border-radius: 0 0 17px !important;
  }

  html body .app-shell .map-stage.map-focus .map-navigation-gadget #locateButton [data-icon],
  html body .app-shell .map-stage.map-focus .map-navigation-gadget #locateButton svg {
    display: block !important;
    width: 20px !important;
    height: 20px !important;
    color: #f7fffd !important;
    opacity: 1 !important;
  }

  html body .app-shell .map-stage.map-focus .map-navigation-gadget .map-gadget-zoom-button {
    font-size: 1.28rem !important;
    font-weight: 850 !important;
    line-height: 1 !important;
  }

  html body .app-shell .map-stage.map-focus .map-navigation-gadget .map-compass::before {
    top: 7px !important;
    left: 50% !important;
    width: 27px !important;
    height: 27px !important;
    transform: translateX(-50%) !important;
  }

  html body .app-shell .map-stage.map-focus .map-navigation-gadget .map-compass-needle {
    top: 9px !important;
    left: 50% !important;
    height: 14px !important;
    transform-origin: 50% 13px !important;
  }

  html body .app-shell .map-stage.map-focus .map-navigation-gadget .map-compass strong {
    top: 9px !important;
    font-size: 0.54rem !important;
  }

  html body .app-shell .map-stage.memories-focus .memory-lane-cover,
  html body main.app-shell section.map-stage.memories-focus .memory-lane-cover {
    position: relative !important;
    isolation: isolate !important;
    background: linear-gradient(145deg, #e3f6f0, #dceef7) !important;
  }

  html body .app-shell .map-stage.memories-focus .memory-lane-cover-image,
  html body .app-shell .map-stage.memories-focus .memory-lane-photo-tile img,
  html body .app-shell .memory-bottom-sheet .sheet-photo-gallery__photo,
  html body .app-shell .full-memory-capsule .sheet-photo-gallery__photo,
  html body main.app-shell section.map-stage.memories-focus .memory-lane-cover-image,
  html body main.app-shell section.map-stage.memories-focus .memory-lane-photo-tile img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 100% !important;
    min-height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: cover !important;
    object-position: center center !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  html body .app-shell .full-memory-capsule .sheet-photo-gallery,
  html body .app-shell .memory-bottom-sheet .sheet-photo-gallery {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    width: 100% !important;
  }

  html body .app-shell .full-memory-capsule .sheet-photo-gallery__item,
  html body .app-shell .memory-bottom-sheet .sheet-photo-gallery__item {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    aspect-ratio: 1 / 1 !important;
    overflow: hidden !important;
    border-radius: 16px !important;
    background: linear-gradient(145deg, #e4f6f1, #dceef6) !important;
  }

  html body .app-shell .full-memory-capsule .sheet-photo-gallery__item.is-cover,
  html body .app-shell .memory-bottom-sheet .sheet-photo-gallery__item.is-cover {
    grid-column: 1 / -1 !important;
    aspect-ratio: 16 / 10 !important;
  }
}
