/* MyMappi v697: dependable pin color and calmer first-save/relive moments. */

/* Keep feeling colors vivid in every supported browser. Earlier pin layers
   used color-mix() for most fills; older WebViews can drop those declarations
   and leave the inline SVG looking gray. These final direct-color fallbacks
   make the selected feeling the authoritative pin color. */
html body .app-shell .map-stage.map-focus .mymappi-pin-only .memory-pin-body,
html body main.app-shell section.map-stage.map-focus .mymappi-pin-only .memory-pin-body {
  fill: var(--marker-color, #0b8e7f) !important;
  stroke: #073b47 !important;
  stroke-width: 1.45px !important;
}

html body .app-shell .map-stage.map-focus .mymappi-pin-only .memory-pin-inner,
html body main.app-shell section.map-stage.map-focus .mymappi-pin-only .memory-pin-inner {
  fill: var(--marker-color, #0b8e7f) !important;
  opacity: 0.76 !important;
}

html body .app-shell .map-stage.map-focus .mymappi-pin-only .memory-pin-center,
html body main.app-shell section.map-stage.map-focus .mymappi-pin-only .memory-pin-center {
  fill: #fffdf8 !important;
  stroke: #073b47 !important;
  stroke-width: 0.72px !important;
}

html body .app-shell .map-stage.map-focus .mymappi-pin-only .memory-pin-core,
html body main.app-shell section.map-stage.map-focus .mymappi-pin-only .memory-pin-core {
  fill: var(--marker-color, #0b8e7f) !important;
}

html body .app-shell .map-stage.map-focus .memory-cluster-marker,
html body .app-shell .map-stage.map-focus .memory-cluster-marker.constellation-cluster,
html body main.app-shell section.map-stage.map-focus .memory-cluster-marker,
html body main.app-shell section.map-stage.map-focus .memory-cluster-marker.constellation-cluster {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(3, 47, 59, 0.24)),
    var(--marker-color, #0b8e7f) !important;
}

/* First save is one composed milestone: icon, message, primary action, then a
   quiet optional action. It stays above the map without competing with an
   automatically opened capsule. */
html body main.app-shell section.map-stage #memorySaveConfirmation.memory-save-confirmation.has-followup[data-kind="success"] {
  position: fixed !important;
  top: 50% !important;
  right: auto !important;
  bottom: auto !important;
  left: 50% !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: auto auto auto auto auto !important;
  justify-items: center !important;
  width: min(374px, calc(100vw - 28px)) !important;
  min-width: 0 !important;
  max-width: calc(100vw - 28px) !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: calc(100dvh - 28px) !important;
  padding: 27px 25px 22px !important;
  gap: 8px !important;
  align-items: center !important;
  overflow: hidden !important;
  border-radius: 27px !important;
  text-align: center !important;
  transform: translate(-50%, calc(-50% + 14px)) scale(0.985) !important;
  transform-origin: 50% 50% !important;
}

html body main.app-shell section.map-stage #memorySaveConfirmation.memory-save-confirmation.has-followup[data-kind="success"].show {
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: translate(-50%, -50%) scale(1) !important;
}

html body main.app-shell section.map-stage #memorySaveConfirmation.memory-save-confirmation.has-followup[data-kind="success"] > span {
  grid-column: 1 !important;
  grid-row: 1 !important;
  align-self: center !important;
  justify-self: center !important;
  width: 54px !important;
  min-width: 54px !important;
  max-width: 54px !important;
  height: 54px !important;
  min-height: 54px !important;
  max-height: 54px !important;
  margin: 0 0 5px !important;
  border-radius: 18px !important;
}

html body main.app-shell section.map-stage #memorySaveConfirmation.memory-save-confirmation.has-followup[data-kind="success"] strong {
  display: block !important;
  grid-column: 1 !important;
  grid-row: 2 !important;
  justify-self: center !important;
  max-width: 19ch !important;
  overflow: visible !important;
  font-size: clamp(1.2rem, 4.8vw, 1.4rem) !important;
  line-height: 1.12 !important;
  text-align: center !important;
  white-space: normal !important;
  overflow-wrap: normal !important;
  -webkit-line-clamp: unset !important;
}

html body main.app-shell section.map-stage #memorySaveConfirmation.memory-save-confirmation.has-followup[data-kind="success"] small {
  display: block !important;
  grid-column: 1 !important;
  grid-row: 3 !important;
  justify-self: center !important;
  max-width: 33ch !important;
  margin: 0 0 8px !important;
  overflow: visible !important;
  font-size: 0.8rem !important;
  line-height: 1.5 !important;
  text-align: center !important;
  white-space: normal !important;
  overflow-wrap: normal !important;
  -webkit-line-clamp: unset !important;
}

html body main.app-shell section.map-stage #memorySaveConfirmation.memory-save-confirmation.has-followup[data-kind="success"] :is(.memory-confirmation-view, .memory-confirmation-secondary) {
  display: inline-flex !important;
  grid-column: 1 !important;
  align-items: center !important;
  justify-content: center !important;
  align-self: center !important;
  justify-self: center !important;
  width: min(100%, 248px) !important;
  min-width: 0 !important;
  margin: 0 !important;
}

html body main.app-shell section.map-stage #memorySaveConfirmation.memory-save-confirmation.has-followup[data-kind="success"] .memory-confirmation-view {
  grid-row: 4 !important;
  min-height: 48px !important;
  border-radius: 16px !important;
  font-size: 0.8rem !important;
}

html body main.app-shell section.map-stage #memorySaveConfirmation.memory-save-confirmation.has-followup[data-kind="success"] .memory-confirmation-secondary {
  grid-row: 5 !important;
  min-height: 36px !important;
  padding: 7px 12px !important;
  border-color: transparent !important;
  color: rgba(235, 255, 248, 0.78) !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 0.74rem !important;
}

html body main.app-shell section.map-stage #memorySaveConfirmation.memory-save-confirmation.has-followup[data-kind="success"] .memory-confirmation-secondary:hover,
html body main.app-shell section.map-stage #memorySaveConfirmation.memory-save-confirmation.has-followup[data-kind="success"] .memory-confirmation-secondary:focus-visible {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.08) !important;
}

/* Established accounts keep one calm chapter action. The card itself still
   opens the storybook; this button begins the immersive map relive. */
html body .app-shell .map-stage.home-focus #homeJourney .life-chapter-actions .life-chapter-relive,
html body main.app-shell section.map-stage.home-focus #homeJourney .life-chapter-actions .life-chapter-relive {
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  min-height: 44px !important;
  border: 1px solid rgba(13, 111, 109, 0.2) !important;
  color: #ffffff !important;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(4, 48, 58, 0.12)),
    var(--chapter-accent, #0d6f6d) !important;
  box-shadow: 0 9px 20px rgba(6, 73, 75, 0.16) !important;
}

@media (max-width: 390px) {
  html body main.app-shell section.map-stage #memorySaveConfirmation.memory-save-confirmation.has-followup[data-kind="success"] {
    width: calc(100vw - 22px) !important;
    padding: 24px 19px 18px !important;
    border-radius: 24px !important;
  }
}
