/*
 * MyMappi private return loop — build 762
 *
 * Presentation-only hooks for the compact Capsule modal, the private pin
 * save bloom, the three-choice keepsake confirmation and Home Relive.
 * This layer is intentionally scoped to the new state classes so the existing
 * full Memory Capsule and generic notifications keep their current behavior.
 */

/* Compact Capsule: a true centered keepsake, not a bottom drawer. */
html body .app-shell .memory-bottom-sheet.memory-capsule-preview-open,
html body main.app-shell .memory-bottom-sheet.memory-capsule-preview-open {
  position: fixed !important;
  inset: 0 !important;
  z-index: 1120 !important;
  display: grid !important;
  inline-size: 100vw !important;
  block-size: 100dvh !important;
  max-block-size: none !important;
  padding:
    max(16px, env(safe-area-inset-top))
    max(16px, env(safe-area-inset-right))
    max(16px, env(safe-area-inset-bottom))
    max(16px, env(safe-area-inset-left)) !important;
  place-items: center !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
  border: 0 !important;
  border-radius: 0 !important;
  color: #f8fffc !important;
  background:
    radial-gradient(circle at 24% 14%, rgba(96, 222, 188, 0.18), transparent 34%),
    radial-gradient(circle at 80% 82%, rgba(92, 161, 209, 0.12), transparent 38%),
    rgba(3, 27, 35, 0.54) !important;
  backdrop-filter: blur(18px) saturate(0.92) !important;
  -webkit-backdrop-filter: blur(18px) saturate(0.92) !important;
  box-shadow: none !important;
  cursor: default !important;
  white-space: normal !important;
  transform: none !important;
}

html body .app-shell .memory-bottom-sheet.memory-capsule-preview-open #memorySheetContent,
html body main.app-shell .memory-bottom-sheet.memory-capsule-preview-open #memorySheetContent {
  position: relative !important;
  z-index: 2 !important;
  align-self: center !important;
  justify-self: center !important;
  inline-size: min(430px, calc(100vw - 32px)) !important;
  max-inline-size: 430px !important;
  max-block-size: none !important;
  margin: auto !important;
  overflow: visible !important;
  transform-origin: center !important;
  animation: private-mm-preview-arrive 420ms cubic-bezier(0.2, 0.78, 0.22, 1) both !important;
}

/* The quiet full-sheet button closes on outside tap without covering the card. */
.memory-bottom-sheet.memory-capsule-preview-open .memory-capsule-preview-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: block;
  inline-size: 100%;
  block-size: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: transparent;
  background: transparent;
  cursor: default;
  -webkit-tap-highlight-color: transparent;
}

.memory-bottom-sheet.memory-capsule-preview-open .memory-capsule-preview-backdrop:focus-visible {
  outline: 2px solid rgba(221, 255, 247, 0.86);
  outline-offset: -5px;
}

html body .app-shell .memory-bottom-sheet.memory-capsule-preview-open .sheet-grabber,
html body main.app-shell .memory-bottom-sheet.memory-capsule-preview-open .sheet-grabber {
  display: none !important;
}

html body .app-shell .memory-bottom-sheet.memory-capsule-preview-open .memory-capsule-preview,
html body main.app-shell .memory-bottom-sheet.memory-capsule-preview-open .memory-capsule-preview {
  position: relative !important;
  z-index: 2 !important;
  inline-size: 100% !important;
  max-inline-size: 430px !important;
  pointer-events: auto !important;
}

/* Top actions float within the keyline and retain native-sized tap targets. */
.memory-bottom-sheet.memory-capsule-preview-open .memory-capsule-preview-top-actions {
  position: absolute;
  inset-block-start: 12px;
  inset-inline-end: 12px;
  z-index: 12;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.memory-bottom-sheet.memory-capsule-preview-open .memory-capsule-preview-top-action,
.memory-bottom-sheet.memory-capsule-preview-open .memory-capsule-preview-close {
  display: grid;
  inline-size: 44px;
  block-size: 44px;
  min-inline-size: 44px;
  min-block-size: 44px;
  margin: 0;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  color: rgba(249, 255, 252, 0.94);
  background: rgba(3, 35, 44, 0.54);
  box-shadow:
    0 8px 20px rgba(2, 22, 29, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px) saturate(1.04);
  -webkit-backdrop-filter: blur(12px) saturate(1.04);
  cursor: pointer;
  transition:
    color 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    transform 200ms ease;
}

.memory-bottom-sheet.memory-capsule-preview-open .memory-capsule-preview-close {
  position: absolute;
  inset-block-start: 12px;
  inset-inline-end: 12px;
  z-index: 12;
}

.memory-bottom-sheet.memory-capsule-preview-open .memory-capsule-preview-top-actions .memory-capsule-preview-close {
  position: static;
}

.memory-bottom-sheet.memory-capsule-preview-open .memory-capsule-preview-top-action svg,
.memory-bottom-sheet.memory-capsule-preview-open .memory-capsule-preview-close svg {
  inline-size: 18px;
  block-size: 18px;
  stroke-width: 2;
}

.memory-bottom-sheet.memory-capsule-preview-open .memory-capsule-preview-top-action:focus-visible,
.memory-bottom-sheet.memory-capsule-preview-open .memory-capsule-preview-close:focus-visible {
  outline: 3px solid rgba(221, 255, 247, 0.98);
  outline-offset: 3px;
}

/* One warm bloom confirms that the moment reached the user's private map. */
.mymappi-pin-only.is-save-blooming,
.mymappi-memory-pin-icon.is-save-blooming .mymappi-pin-only {
  z-index: 9;
  transform-origin: 50% 94%;
  will-change: filter, transform;
  animation: private-mm-pin-save-bloom 820ms cubic-bezier(0.18, 0.8, 0.2, 1) both;
}

.mymappi-pin-only.is-save-blooming .memory-pin-svg,
.mymappi-memory-pin-icon.is-save-blooming .memory-pin-svg {
  animation: private-mm-pin-inner-glow 820ms ease both;
}

/* Save confirmation: Open Capsule, Add one more detail, or Done. */
html body .app-shell .memory-save-confirmation.pin-keepsake,
html body main.app-shell .memory-save-confirmation.pin-keepsake {
  position: fixed !important;
  inset-inline: 50% auto !important;
  inset-block: auto calc(var(--bottom-nav-height, 86px) + max(18px, env(safe-area-inset-bottom))) !important;
  z-index: 980 !important;
  display: grid !important;
  grid-template-columns: 44px minmax(0, 1fr) !important;
  inline-size: min(610px, calc(100vw - 32px)) !important;
  max-inline-size: 610px !important;
  padding: 16px !important;
  gap: 5px 12px !important;
  align-items: center !important;
  border: 1px solid rgba(255, 255, 255, 0.62) !important;
  border-radius: 24px !important;
  color: #f8fffc !important;
  background:
    radial-gradient(circle at 12% 5%, rgba(106, 231, 192, 0.26), transparent 34%),
    linear-gradient(140deg, rgba(5, 53, 65, 0.97), rgba(5, 107, 94, 0.96)) !important;
  box-shadow:
    0 24px 54px rgba(2, 27, 35, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.18) !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translate(-50%, 14px) scale(0.985) !important;
  transition: opacity 220ms ease, transform 280ms cubic-bezier(0.2, 0.78, 0.22, 1) !important;
  backdrop-filter: blur(18px) saturate(1.04) !important;
  -webkit-backdrop-filter: blur(18px) saturate(1.04) !important;
}

html body .app-shell .memory-save-confirmation.pin-keepsake.show,
html body main.app-shell .memory-save-confirmation.pin-keepsake.show {
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: translate(-50%, 0) scale(1) !important;
}

.pin-keepsake > span,
.pin-keepsake .pin-keepsake-mark {
  grid-column: 1;
  grid-row: 1 / span 2;
  display: grid;
  inline-size: 44px;
  block-size: 44px;
  min-inline-size: 44px;
  min-block-size: 44px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.44);
  border-radius: 34%;
  color: #07515c;
  background: rgba(237, 255, 249, 0.94);
  box-shadow:
    0 10px 22px rgba(2, 35, 42, 0.14),
    0 0 0 6px rgba(225, 255, 245, 0.08);
}

.pin-keepsake .pin-keepsake-copy {
  grid-column: 2;
  min-inline-size: 0;
}

.pin-keepsake strong,
.pin-keepsake .pin-keepsake-title {
  display: block;
  margin: 0;
  overflow: hidden;
  color: #ffffff;
  font-size: 0.94rem;
  font-weight: 880;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pin-keepsake small,
.pin-keepsake .pin-keepsake-message {
  display: block;
  margin-block-start: 3px;
  overflow: hidden;
  color: rgba(240, 255, 250, 0.74);
  font-size: 0.72rem;
  font-weight: 650;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pin-keepsake .pin-keepsake-actions,
.pin-keepsake .memory-confirmation-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  inline-size: 100%;
  margin-block-start: 9px;
  gap: 8px;
}

.pin-keepsake .pin-keepsake-action,
.pin-keepsake .memory-confirmation-view,
.pin-keepsake .memory-confirmation-secondary,
.pin-keepsake .memory-confirmation-done {
  display: inline-flex;
  min-inline-size: 0;
  min-block-size: 44px;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 9px 11px;
  gap: 6px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: rgba(247, 255, 252, 0.9);
  background: rgba(255, 255, 255, 0.09);
  box-shadow: none;
  cursor: pointer;
  font: inherit;
  font-size: 0.69rem;
  font-weight: 810;
  line-height: 1.1;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.pin-keepsake .pin-keepsake-action--primary,
.pin-keepsake .memory-confirmation-view {
  border-color: rgba(255, 255, 255, 0.78);
  color: #074d58;
  background: rgba(250, 255, 253, 0.96);
  box-shadow: 0 9px 20px rgba(2, 32, 40, 0.16);
}

.pin-keepsake .pin-keepsake-action--quiet,
.pin-keepsake .memory-confirmation-done {
  color: rgba(240, 255, 250, 0.76);
  background: transparent;
}

.pin-keepsake .pin-keepsake-action:focus-visible,
.pin-keepsake .memory-confirmation-view:focus-visible,
.pin-keepsake .memory-confirmation-secondary:focus-visible,
.pin-keepsake .memory-confirmation-done:focus-visible {
  outline: 3px solid rgba(221, 255, 247, 0.98);
  outline-offset: 2px;
}

/* Home Relive gives one private memory back before asking for another. */
.home-private-relive {
  --home-private-relive-accent: #58cdb0;
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  inline-size: min(100%, 820px);
  min-block-size: 88px;
  margin-inline: auto;
  padding: 14px 16px;
  gap: 13px;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 24px;
  color: #164854;
  background:
    radial-gradient(
      circle at 5% 0%,
      color-mix(in srgb, var(--home-private-relive-accent) 19%, transparent),
      transparent 42%
    ),
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(239, 249, 246, 0.96));
  box-shadow:
    0 16px 36px rgba(5, 62, 69, 0.09),
    inset 0 1px 0 #ffffff;
  font: inherit;
  text-align: start;
  transition: border-color 200ms ease, box-shadow 240ms ease, transform 240ms ease;
}

button.home-private-relive,
a.home-private-relive {
  cursor: pointer;
  text-decoration: none;
}

.home-private-relive-mark {
  display: grid;
  inline-size: 52px;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(7, 100, 99, 0.1);
  border-radius: 36%;
  color: #087069;
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.94), transparent 45%),
    color-mix(in srgb, var(--home-private-relive-accent) 18%, #edf9f5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.home-private-relive-mark svg,
.home-private-relive-mark img {
  inline-size: 24px;
  block-size: 24px;
  object-fit: contain;
}

.home-private-relive-copy {
  display: grid;
  min-inline-size: 0;
  gap: 3px;
}

.home-private-relive-kicker {
  color: #08766e;
  font-size: 0.62rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.home-private-relive-title {
  margin: 0;
  overflow: hidden;
  color: #123f4b;
  font-size: clamp(0.94rem, 2vw, 1.08rem);
  font-weight: 860;
  letter-spacing: -0.018em;
  line-height: 1.18;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-private-relive-note {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: #637e82;
  font-size: 0.72rem;
  font-weight: 620;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.home-private-relive-action {
  display: grid;
  inline-size: 44px;
  block-size: 44px;
  min-inline-size: 44px;
  min-block-size: 44px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(7, 105, 101, 0.12);
  border-radius: 50%;
  color: #08736b;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 8px 18px rgba(5, 73, 76, 0.08);
}

.home-private-relive-action svg {
  inline-size: 18px;
  block-size: 18px;
}

.home-private-relive:focus-visible,
.home-private-relive-action:focus-visible {
  outline: 3px solid rgba(13, 129, 118, 0.38);
  outline-offset: 3px;
}

.home-private-relive.is-reliving {
  border-color: color-mix(in srgb, var(--home-private-relive-accent) 42%, white);
  box-shadow:
    0 18px 40px rgba(5, 73, 76, 0.12),
    0 0 0 4px color-mix(in srgb, var(--home-private-relive-accent) 12%, transparent);
}

/* Native hidden must always win over modal, toast and card display states. */
html body .app-shell .memory-bottom-sheet.memory-capsule-preview-open[hidden],
html body main.app-shell .memory-bottom-sheet.memory-capsule-preview-open[hidden],
html body .app-shell .memory-save-confirmation.pin-keepsake[hidden],
html body main.app-shell .memory-save-confirmation.pin-keepsake[hidden],
.memory-bottom-sheet.memory-capsule-preview-open [hidden],
.memory-bottom-sheet.memory-capsule-preview-open .memory-capsule-preview-backdrop[hidden],
.pin-keepsake [hidden],
.home-private-relive[hidden],
.home-private-relive [hidden] {
  display: none !important;
}

@keyframes private-mm-preview-arrive {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.986);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes private-mm-pin-save-bloom {
  0%, 100% {
    filter: none;
    transform: scale(1);
  }
  38% {
    filter: drop-shadow(0 0 9px rgba(91, 231, 187, 0.86)) drop-shadow(0 8px 12px rgba(3, 53, 58, 0.2));
    transform: translateY(-3px) scale(1.16);
  }
  68% {
    filter: drop-shadow(0 0 5px rgba(91, 231, 187, 0.42));
    transform: translateY(0) scale(0.985);
  }
}

@keyframes private-mm-pin-inner-glow {
  0%, 100% {
    filter: none;
  }
  42% {
    filter: brightness(1.12) saturate(1.12);
  }
}

@media (hover: hover) and (pointer: fine) {
  .memory-bottom-sheet.memory-capsule-preview-open .memory-capsule-preview-top-action:hover,
  .memory-bottom-sheet.memory-capsule-preview-open .memory-capsule-preview-close:hover {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.46);
    background: rgba(3, 40, 49, 0.72);
    transform: translateY(-1px);
  }

  .pin-keepsake .pin-keepsake-action:hover,
  .pin-keepsake .memory-confirmation-view:hover,
  .pin-keepsake .memory-confirmation-secondary:hover,
  .pin-keepsake .memory-confirmation-done:hover {
    border-color: rgba(255, 255, 255, 0.46);
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
  }

  .home-private-relive:hover {
    border-color: color-mix(in srgb, var(--home-private-relive-accent) 34%, white);
    box-shadow:
      0 20px 42px rgba(5, 62, 69, 0.12),
      inset 0 1px 0 #ffffff;
    transform: translateY(-2px);
  }
}

/* Phone save confirmation keeps three decisions readable without tiny taps. */
@media (max-width: 720px) {
  html body .app-shell .memory-bottom-sheet.memory-capsule-preview-open,
  html body main.app-shell .memory-bottom-sheet.memory-capsule-preview-open {
    padding:
      max(10px, env(safe-area-inset-top))
      max(10px, env(safe-area-inset-right))
      max(10px, env(safe-area-inset-bottom))
      max(10px, env(safe-area-inset-left)) !important;
  }

  html body .app-shell .memory-bottom-sheet.memory-capsule-preview-open #memorySheetContent,
  html body main.app-shell .memory-bottom-sheet.memory-capsule-preview-open #memorySheetContent {
    inline-size: min(430px, calc(100vw - 20px)) !important;
  }

  html body .app-shell .memory-save-confirmation.pin-keepsake,
  html body main.app-shell .memory-save-confirmation.pin-keepsake {
    inline-size: calc(100vw - 24px) !important;
    padding: 14px !important;
    border-radius: 22px !important;
  }

  .pin-keepsake .pin-keepsake-actions,
  .pin-keepsake .memory-confirmation-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pin-keepsake .pin-keepsake-action--primary,
  .pin-keepsake .memory-confirmation-view {
    grid-column: 1 / -1;
  }

  .home-private-relive {
    grid-template-columns: 46px minmax(0, 1fr) 44px;
    min-block-size: 80px;
    padding: 12px;
    gap: 10px;
    border-radius: 21px;
  }

  .home-private-relive-mark {
    inline-size: 46px;
  }
}

/* Short landscape phones use the available height as the preview boundary. */
@media (max-height: 600px) and (orientation: landscape) {
  html body .app-shell .memory-bottom-sheet.memory-capsule-preview-open #memorySheetContent,
  html body main.app-shell .memory-bottom-sheet.memory-capsule-preview-open #memorySheetContent {
    inline-size: min(76dvh, calc(100vw - 32px)) !important;
  }
}

/* iPad portrait and landscape share a restrained, centered object size. */
@media (min-width: 721px) and (max-width: 1366px) {
  html body .app-shell .memory-bottom-sheet.memory-capsule-preview-open #memorySheetContent,
  html body main.app-shell .memory-bottom-sheet.memory-capsule-preview-open #memorySheetContent {
    inline-size: min(440px, calc(100vw - 48px)) !important;
    max-inline-size: 440px !important;
  }

  html body .app-shell .memory-save-confirmation.pin-keepsake,
  html body main.app-shell .memory-save-confirmation.pin-keepsake {
    inline-size: min(610px, calc(100vw - 48px)) !important;
  }
}

@media (prefers-contrast: more) {
  .memory-bottom-sheet.memory-capsule-preview-open .memory-capsule-preview-top-action,
  .memory-bottom-sheet.memory-capsule-preview-open .memory-capsule-preview-close,
  .memory-bottom-sheet.memory-capsule-preview-open .memory-capsule-preview-backdrop,
  .pin-keepsake,
  .pin-keepsake .pin-keepsake-action,
  .home-private-relive,
  .home-private-relive-action {
    border-width: 2px !important;
  }

  .pin-keepsake small,
  .pin-keepsake .pin-keepsake-message,
  .home-private-relive-note {
    color: currentColor;
  }
}

@media (forced-colors: active) {
  .memory-bottom-sheet.memory-capsule-preview-open .memory-capsule-preview-top-action,
  .memory-bottom-sheet.memory-capsule-preview-open .memory-capsule-preview-close,
  .memory-bottom-sheet.memory-capsule-preview-open .memory-capsule-preview-backdrop,
  .pin-keepsake,
  .pin-keepsake > span,
  .pin-keepsake .pin-keepsake-mark,
  .pin-keepsake .pin-keepsake-action,
  .home-private-relive,
  .home-private-relive-mark,
  .home-private-relive-action {
    border: 1px solid CanvasText !important;
    forced-color-adjust: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  html body .app-shell .memory-bottom-sheet.memory-capsule-preview-open,
  html body main.app-shell .memory-bottom-sheet.memory-capsule-preview-open,
  html body .app-shell .memory-bottom-sheet.memory-capsule-preview-open #memorySheetContent,
  html body main.app-shell .memory-bottom-sheet.memory-capsule-preview-open #memorySheetContent,
  .memory-bottom-sheet.memory-capsule-preview-open .memory-capsule-preview-top-action,
  .memory-bottom-sheet.memory-capsule-preview-open .memory-capsule-preview-close,
  .mymappi-pin-only.is-save-blooming,
  .mymappi-memory-pin-icon.is-save-blooming .mymappi-pin-only,
  .mymappi-pin-only.is-save-blooming .memory-pin-svg,
  .mymappi-memory-pin-icon.is-save-blooming .memory-pin-svg,
  .pin-keepsake,
  .pin-keepsake .pin-keepsake-action,
  .home-private-relive,
  .home-private-relive-action {
    animation: none !important;
    scroll-behavior: auto !important;
    transition: none !important;
  }

  .mymappi-pin-only.is-save-blooming,
  .mymappi-memory-pin-icon.is-save-blooming .mymappi-pin-only,
  .home-private-relive:hover {
    filter: none !important;
    transform: none !important;
  }
}

/*
 * Cascade lock: build 722 intentionally uses three-ID specificity to protect
 * its older two-action map toast. Match that scope, then add `.pin-keepsake`
 * so the new private-memory return card reliably owns its layout.
 */
html:not(#private-mm-return-v762-a):not(#private-mm-return-v762-b) body main.app-shell section.map-stage #memorySaveConfirmation.memory-save-confirmation.pin-keepsake.has-followup[data-kind="success"][data-presentation="map-lane"] {
  position: fixed !important;
  top: auto !important;
  right: auto !important;
  bottom: calc(var(--bottom-nav-height, 86px) + max(18px, env(safe-area-inset-bottom))) !important;
  left: 50% !important;
  display: grid !important;
  grid-template-columns: 44px minmax(0, 1fr) !important;
  grid-template-rows: auto auto auto !important;
  align-items: center !important;
  justify-items: stretch !important;
  box-sizing: border-box !important;
  width: min(610px, calc(100vw - 32px)) !important;
  max-width: 610px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-height: none !important;
  padding: 16px !important;
  gap: 5px 12px !important;
  overflow: visible !important;
  border-radius: 24px !important;
  text-align: left !important;
  translate: none !important;
  transform: translate(-50%, 14px) scale(0.985) !important;
  transform-origin: 50% 100% !important;
}

html:not(#private-mm-return-v762-a):not(#private-mm-return-v762-b) body main.app-shell section.map-stage #memorySaveConfirmation.memory-save-confirmation.pin-keepsake.has-followup[data-kind="success"][data-presentation="map-lane"].show {
  transform: translate(-50%, 0) scale(1) !important;
}

html:not(#private-mm-return-v762-a):not(#private-mm-return-v762-b) body main.app-shell section.map-stage #memorySaveConfirmation.memory-save-confirmation.pin-keepsake.has-followup[data-kind="success"] > span {
  grid-column: 1 !important;
  grid-row: 1 / span 2 !important;
  align-self: center !important;
  justify-self: center !important;
  width: 44px !important;
  min-width: 44px !important;
  max-width: 44px !important;
  height: 44px !important;
  min-height: 44px !important;
  max-height: 44px !important;
  margin: 0 !important;
}

html:not(#private-mm-return-v762-a):not(#private-mm-return-v762-b) body main.app-shell section.map-stage #memorySaveConfirmation.memory-save-confirmation.pin-keepsake.has-followup[data-kind="success"] > :is(strong, small) {
  grid-column: 2 !important;
  justify-self: stretch !important;
  min-width: 0 !important;
  max-width: 100% !important;
  margin: 0 !important;
  overflow: hidden !important;
  text-align: left !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

html:not(#private-mm-return-v762-a):not(#private-mm-return-v762-b) body main.app-shell section.map-stage #memorySaveConfirmation.memory-save-confirmation.pin-keepsake.has-followup[data-kind="success"] > strong {
  display: block !important;
  grid-row: 1 !important;
  font-size: 0.94rem !important;
  line-height: 1.2 !important;
  -webkit-line-clamp: unset !important;
}

html:not(#private-mm-return-v762-a):not(#private-mm-return-v762-b) body main.app-shell section.map-stage #memorySaveConfirmation.memory-save-confirmation.pin-keepsake.has-followup[data-kind="success"] > small {
  display: block !important;
  grid-row: 2 !important;
  margin-top: 3px !important;
  font-size: 0.72rem !important;
  line-height: 1.35 !important;
  -webkit-line-clamp: unset !important;
}

html:not(#private-mm-return-v762-a):not(#private-mm-return-v762-b) body main.app-shell section.map-stage #memorySaveConfirmation.memory-save-confirmation.pin-keepsake.has-followup[data-kind="success"] .memory-confirmation-status {
  display: none !important;
}

html:not(#private-mm-return-v762-a):not(#private-mm-return-v762-b) body main.app-shell section.map-stage #memorySaveConfirmation.memory-save-confirmation.pin-keepsake.has-followup[data-kind="success"] .memory-confirmation-actions {
  display: grid !important;
  grid-column: 1 / -1 !important;
  grid-row: 3 !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  grid-template-rows: minmax(44px, auto) !important;
  grid-auto-flow: row !important;
  grid-auto-rows: auto !important;
  grid-auto-columns: auto !important;
  align-items: stretch !important;
  justify-items: stretch !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 9px 0 0 !important;
  gap: 8px !important;
}

html:not(#private-mm-return-v762-a):not(#private-mm-return-v762-b) body main.app-shell section.map-stage #memorySaveConfirmation.memory-save-confirmation.pin-keepsake.has-followup[data-kind="success"] .memory-confirmation-actions > :is(.memory-confirmation-view, .memory-confirmation-secondary, .memory-confirmation-done) {
  display: inline-flex !important;
  grid-column: auto !important;
  grid-row: auto !important;
  align-self: stretch !important;
  justify-self: stretch !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 44px !important;
  margin: 0 !important;
  padding: 9px 11px !important;
  border-radius: 999px !important;
  font-size: 0.69rem !important;
  font-weight: 810 !important;
  line-height: 1.1 !important;
  text-align: center !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

html:not(#private-mm-return-v762-a):not(#private-mm-return-v762-b) body main.app-shell section.map-stage #memorySaveConfirmation.memory-save-confirmation.pin-keepsake.has-followup[data-kind="success"] .memory-confirmation-actions > .memory-confirmation-view {
  border: 1px solid rgba(255, 255, 255, 0.78) !important;
  color: #074d58 !important;
  background: rgba(250, 255, 253, 0.96) !important;
  box-shadow: 0 9px 20px rgba(2, 32, 40, 0.16) !important;
}

html:not(#private-mm-return-v762-a):not(#private-mm-return-v762-b) body main.app-shell section.map-stage #memorySaveConfirmation.memory-save-confirmation.pin-keepsake.has-followup[data-kind="success"] .memory-confirmation-actions > .memory-confirmation-secondary {
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  color: rgba(247, 255, 252, 0.9) !important;
  background: rgba(255, 255, 255, 0.09) !important;
  box-shadow: none !important;
}

html:not(#private-mm-return-v762-a):not(#private-mm-return-v762-b) body main.app-shell section.map-stage #memorySaveConfirmation.memory-save-confirmation.pin-keepsake.has-followup[data-kind="success"] .memory-confirmation-actions > .memory-confirmation-done {
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  color: rgba(240, 255, 250, 0.76) !important;
  background: transparent !important;
  box-shadow: none !important;
}

@media (max-width: 720px) {
  html:not(#private-mm-return-v762-a):not(#private-mm-return-v762-b) body main.app-shell section.map-stage #memorySaveConfirmation.memory-save-confirmation.pin-keepsake.has-followup[data-kind="success"][data-presentation="map-lane"] {
    right: auto !important;
    bottom: calc(var(--bottom-nav-height, 86px) + max(18px, env(safe-area-inset-bottom))) !important;
    left: 50% !important;
    width: calc(100vw - 24px) !important;
    max-width: 610px !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: 14px !important;
    gap: 5px 12px !important;
    border-radius: 22px !important;
  }

  html:not(#private-mm-return-v762-a):not(#private-mm-return-v762-b) body main.app-shell section.map-stage #memorySaveConfirmation.memory-save-confirmation.pin-keepsake.has-followup[data-kind="success"] .memory-confirmation-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-template-rows: repeat(2, minmax(44px, auto)) !important;
    grid-auto-flow: row !important;
    margin-top: 9px !important;
  }

  html:not(#private-mm-return-v762-a):not(#private-mm-return-v762-b) body main.app-shell section.map-stage #memorySaveConfirmation.memory-save-confirmation.pin-keepsake.has-followup[data-kind="success"] .memory-confirmation-actions > .memory-confirmation-view {
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;
  }

  html:not(#private-mm-return-v762-a):not(#private-mm-return-v762-b) body main.app-shell section.map-stage #memorySaveConfirmation.memory-save-confirmation.pin-keepsake.has-followup[data-kind="success"] .memory-confirmation-actions > .memory-confirmation-secondary {
    grid-column: 1 !important;
    grid-row: 2 !important;
  }

  html:not(#private-mm-return-v762-a):not(#private-mm-return-v762-b) body main.app-shell section.map-stage #memorySaveConfirmation.memory-save-confirmation.pin-keepsake.has-followup[data-kind="success"] .memory-confirmation-actions > .memory-confirmation-done {
    grid-column: 2 !important;
    grid-row: 2 !important;
  }
}

@media (prefers-contrast: more) {
  html:not(#private-mm-return-v762-a):not(#private-mm-return-v762-b) body main.app-shell section.map-stage #memorySaveConfirmation.memory-save-confirmation.pin-keepsake.has-followup[data-kind="success"] .memory-confirmation-actions > :is(.memory-confirmation-view, .memory-confirmation-secondary, .memory-confirmation-done) {
    border-width: 2px !important;
  }
}

@media (forced-colors: active) {
  html:not(#private-mm-return-v762-a):not(#private-mm-return-v762-b) body main.app-shell section.map-stage #memorySaveConfirmation.memory-save-confirmation.pin-keepsake.has-followup[data-kind="success"],
  html:not(#private-mm-return-v762-a):not(#private-mm-return-v762-b) body main.app-shell section.map-stage #memorySaveConfirmation.memory-save-confirmation.pin-keepsake.has-followup[data-kind="success"] > span,
  html:not(#private-mm-return-v762-a):not(#private-mm-return-v762-b) body main.app-shell section.map-stage #memorySaveConfirmation.memory-save-confirmation.pin-keepsake.has-followup[data-kind="success"] .memory-confirmation-actions > :is(.memory-confirmation-view, .memory-confirmation-secondary, .memory-confirmation-done) {
    border: 1px solid CanvasText !important;
    color: CanvasText !important;
    background: Canvas !important;
    box-shadow: none !important;
    forced-color-adjust: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  html:not(#private-mm-return-v762-a):not(#private-mm-return-v762-b) body main.app-shell section.map-stage #memorySaveConfirmation.memory-save-confirmation.pin-keepsake.has-followup[data-kind="success"],
  html:not(#private-mm-return-v762-a):not(#private-mm-return-v762-b) body main.app-shell section.map-stage #memorySaveConfirmation.memory-save-confirmation.pin-keepsake.has-followup[data-kind="success"] .memory-confirmation-actions > button {
    animation: none !important;
    transition: none !important;
  }
}
