/* MyMappi v739 — calm Memory Capsule surfaces and a native horizontal photo rail. */
html body .app-shell .full-memory-capsule .memory-capsule-cover-gallery {
  display: flex !important;
  width: 100% !important;
  height: 100% !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scroll-snap-type: x mandatory !important;
  overscroll-behavior-inline: contain !important;
  touch-action: pan-x !important;
  scrollbar-width: none !important;
  -webkit-overflow-scrolling: touch !important;
}

html body .app-shell .full-memory-capsule .memory-capsule-cover-gallery::-webkit-scrollbar {
  display: none !important;
}

html body .app-shell .full-memory-capsule .memory-capsule-cover-slide {
  flex: 0 0 100% !important;
  width: 100% !important;
  min-width: 100% !important;
  height: 100% !important;
  scroll-snap-align: start !important;
  scroll-snap-stop: always !important;
  touch-action: pan-x !important;
}

html body .app-shell .full-memory-capsule .memory-capsule-cover-slide > img {
  width: 100% !important;
  height: 100% !important;
}

html body .app-shell .photo-lightbox-gallery-nav {
  position: absolute !important;
  z-index: 10 !important;
  top: 50% !important;
  display: inline-flex !important;
  width: 46px !important;
  height: 46px !important;
  align-items: center !important;
  justify-content: center !important;
  border: 1px solid rgba(255, 255, 255, 0.42) !important;
  border-radius: 999px !important;
  color: #fff !important;
  background: rgba(7, 34, 41, 0.58) !important;
  box-shadow: 0 4px 14px rgba(3, 26, 32, 0.16) !important;
  backdrop-filter: blur(6px) !important;
  -webkit-backdrop-filter: blur(6px) !important;
  transform: translateY(-50%) !important;
}

html body .app-shell .photo-lightbox-gallery-nav.is-previous {
  left: max(14px, env(safe-area-inset-left)) !important;
}

html body .app-shell .photo-lightbox-gallery-nav.is-next {
  right: max(14px, env(safe-area-inset-right)) !important;
}

html body .app-shell .photo-lightbox-gallery-nav[hidden] {
  display: none !important;
}

html body .app-shell .photo-lightbox-gallery-nav:disabled {
  visibility: hidden !important;
}

html body .app-shell .photo-lightbox-gallery-nav svg {
  width: 20px !important;
  height: 20px !important;
}

html body .app-shell .memory-bottom-sheet.open,
html body main.app-shell .memory-bottom-sheet.open {
  background: rgba(8, 35, 42, 0.2) !important;
  backdrop-filter: blur(6px) saturate(0.94) !important;
  -webkit-backdrop-filter: blur(6px) saturate(0.94) !important;
}

html body .app-shell .memory-bottom-sheet.open #memorySheetContent,
html body main.app-shell .memory-bottom-sheet.open #memorySheetContent {
  animation-duration: 240ms !important;
}

html body .app-shell .full-memory-capsule .memory-capsule-inside-card,
html body main.app-shell .full-memory-capsule .memory-capsule-inside-card {
  border-color: rgba(11, 91, 101, 0.11) !important;
  background: #fbfdfc !important;
  box-shadow: 0 4px 14px rgba(5, 52, 65, 0.045) !important;
}

html body .app-shell .full-memory-capsule .memory-capsule-soundscape,
html body main.app-shell .full-memory-capsule .memory-capsule-soundscape {
  color: #174d58 !important;
  border-color: rgba(11, 105, 108, 0.14) !important;
  background: #f1f7f5 !important;
  box-shadow: none !important;
}

html body .app-shell .full-memory-capsule .memory-capsule-soundscape :is(header strong, .memory-capsule-voice-heading strong, .memory-capsule-song strong),
html body main.app-shell .full-memory-capsule .memory-capsule-soundscape :is(header strong, .memory-capsule-voice-heading strong, .memory-capsule-song strong) {
  color: #174d58 !important;
}

html body .app-shell .full-memory-capsule .memory-capsule-soundscape :is(header small, .memory-capsule-voice-heading small, .memory-capsule-song small),
html body main.app-shell .full-memory-capsule .memory-capsule-soundscape :is(header small, .memory-capsule-voice-heading small, .memory-capsule-song small) {
  color: #607a7d !important;
}

html body .app-shell .full-memory-capsule .memory-capsule-soundscape > header > :is(svg, [data-lucide]),
html body main.app-shell .full-memory-capsule .memory-capsule-soundscape > header > :is(svg, [data-lucide]) {
  color: #116f70 !important;
  background: #e2efeb !important;
}

html body .app-shell .full-memory-capsule .memory-capsule-remove-sound {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  min-height: 44px !important;
  padding: 8px 11px !important;
  border: 1px solid rgba(132, 61, 61, 0.2) !important;
  border-radius: 12px !important;
  color: #7e3838 !important;
  background: rgba(255, 255, 255, 0.72) !important;
  box-shadow: none !important;
  font: inherit !important;
  font-size: 0.72rem !important;
  font-weight: 760 !important;
}

html body .app-shell .full-memory-capsule .memory-capsule-remove-sound svg {
  width: 15px !important;
  height: 15px !important;
}

@media (max-width: 720px) {
  html body.photo-lightbox-open .app-shell .photo-lightbox:not(.video-mode) .photo-lightbox-gallery,
  html body.photo-lightbox-open main.app-shell .photo-lightbox:not(.video-mode) .photo-lightbox-gallery {
    flex-direction: column !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    scroll-snap-type: y mandatory !important;
    overscroll-behavior-y: contain !important;
    touch-action: pan-y pinch-zoom !important;
  }

  html body.photo-lightbox-open .app-shell .photo-lightbox:not(.video-mode) .photo-lightbox-gallery-item,
  html body.photo-lightbox-open main.app-shell .photo-lightbox:not(.video-mode) .photo-lightbox-gallery-item {
    flex: 0 0 100% !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 100% !important;
  }

  html body.photo-lightbox-open .app-shell .photo-lightbox:not(.video-mode) .photo-lightbox-gallery-item > img,
  html body.photo-lightbox-open main.app-shell .photo-lightbox:not(.video-mode) .photo-lightbox-gallery-item > img {
    touch-action: pan-y pinch-zoom !important;
  }

  html body .app-shell .photo-lightbox-gallery-nav {
    display: none !important;
  }

  html body .app-shell .full-memory-capsule .memory-capsule-voice-row,
  html body main.app-shell .full-memory-capsule .memory-capsule-voice-row {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  html body .app-shell .full-memory-capsule .memory-capsule-remove-sound {
    width: 100% !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html body .app-shell .full-memory-capsule .memory-capsule-cover-gallery {
    scroll-behavior: auto !important;
  }
}
