/* One quieter saved capsule: balanced cover, useful content, and aligned menus.
   Photo fit and the user's saved focal point remain owned by the gallery. */
html body main.app-shell #memoryBottomSheet .full-memory-capsule.memory-sharing-finish .memory-capsule-visual.has-cover-photo {
  height: auto !important;
  min-height: clamp(300px, 45svh, 430px) !important;
  max-height: none !important;
}
html body main.app-shell #memoryBottomSheet .full-memory-capsule.memory-sharing-finish .memory-capsule-visual.has-cover-photo .memory-capsule-hero {
  position: relative !important;
  inset: auto !important;
  min-height: clamp(300px, 45svh, 430px) !important;
  height: auto !important;
  padding: 22px clamp(20px, 4vw, 30px) !important;
}
html body main.app-shell #memoryBottomSheet .full-memory-capsule.memory-sharing-finish .memory-capsule-title-block h2 {
  font-size: clamp(1.55rem, 4.6vw, 2.4rem) !important;
  line-height: 1.12 !important;
  letter-spacing: -.035em !important;
  overflow-wrap: anywhere !important;
}
html body main.app-shell #memoryBottomSheet .full-memory-capsule.memory-sharing-finish .memory-capsule-title-block {
  gap: 8px !important;
}
html body main.app-shell #memoryBottomSheet .full-memory-capsule.memory-sharing-finish .memory-capsule-memory-seal {
  line-height: 1.45 !important;
}
html body main.app-shell #memoryBottomSheet .full-memory-capsule.memory-sharing-finish .memory-capsule-body:empty {
  display: none !important;
}
html body main.app-shell #memoryBottomSheet .full-memory-capsule.memory-sharing-finish .memory-capsule-quiet-add-story {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  justify-self: start !important;
  gap: 8px !important;
  min-height: 44px !important;
  margin: 4px 0 !important;
  padding: 10px 14px !important;
  border: 1px solid #c9dfe4 !important;
  border-radius: 13px !important;
  color: #00263d !important;
  background: #f8fcfd !important;
  box-shadow: none !important;
  font: inherit !important;
  font-size: .86rem !important;
  font-weight: 750 !important;
  line-height: 1.35 !important;
}
html body main.app-shell #memoryBottomSheet .full-memory-capsule.memory-sharing-finish .memory-capsule-quiet-add-story svg {
  width: 18px !important;
  height: 18px !important;
}

/* Each menu action owns the entire row, rather than a variable-width pill. */
html body main.app-shell #memoryBottomSheet .full-memory-capsule.memory-sharing-finish .memory-capsule-more {
  /* Received originals have fewer actions. Anchor the menu to the full sticky
     dock, not to a third grid cell that may end near the screen's center. */
  position: static !important;
}
html body main.app-shell #memoryBottomSheet .full-memory-capsule.memory-sharing-finish .memory-capsule-more-menu {
  left: auto !important;
  right: clamp(10px, 2vw, 20px) !important;
  bottom: calc(100% + 8px) !important;
  display: grid !important;
  gap: 2px !important;
  width: min(300px, calc(100vw - 56px)) !important;
  min-width: 0 !important;
  max-width: calc(100vw - 56px) !important;
  max-height: min(390px, calc(100svh - 150px)) !important;
  padding: 8px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
  border: 1px solid #cfe0e5 !important;
  border-radius: 18px !important;
  color: #00263d !important;
  background: #f9fcfd !important;
  box-shadow: 0 16px 42px #00263d26 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
html body main.app-shell #memoryBottomSheet .full-memory-capsule.memory-sharing-finish .memory-capsule-more-menu[hidden] {
  display: none !important;
}
html body main.app-shell #memoryBottomSheet .full-memory-capsule.memory-sharing-finish .memory-capsule-more-menu > [role="menuitem"] {
  display: grid !important;
  grid-template-columns: 24px minmax(0, 1fr) !important;
  align-items: center !important;
  justify-content: stretch !important;
  gap: 12px !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  height: auto !important;
  min-height: 48px !important;
  margin: 0 !important;
  padding: 11px 13px !important;
  border: 0 !important;
  border-radius: 10px !important;
  color: #00263d !important;
  background: transparent !important;
  box-shadow: none !important;
  transform: none !important;
  font: inherit !important;
  font-size: max(14px, .86rem) !important;
  font-weight: 750 !important;
  line-height: 1.35 !important;
  text-align: left !important;
  white-space: normal !important;
}
html body main.app-shell #memoryBottomSheet .full-memory-capsule.memory-sharing-finish .memory-capsule-menu-icon {
  display: grid !important;
  place-items: center !important;
  width: 24px !important;
  height: 24px !important;
}
html body main.app-shell #memoryBottomSheet .full-memory-capsule.memory-sharing-finish .memory-capsule-menu-icon svg {
  width: 22px !important;
  height: 22px !important;
  margin: 0 !important;
  stroke-width: 2 !important;
}
html body main.app-shell #memoryBottomSheet .full-memory-capsule.memory-sharing-finish .memory-capsule-menu-label {
  min-width: 0 !important;
  overflow-wrap: anywhere !important;
}
html body main.app-shell #memoryBottomSheet .full-memory-capsule.memory-sharing-finish .memory-capsule-menu-divider {
  height: 1px !important;
  margin: 6px !important;
  background: #dbe7eb !important;
}
/* Create exactly one equal-width column per visible action. Server-managed
   originals have two or three actions; personal memories normally have four. */
html body main.app-shell #memoryBottomSheet .full-memory-capsule.memory-sharing-finish .memory-capsule-action-dock {
  grid-template-columns: none !important;
  grid-auto-flow: column !important;
  grid-auto-columns: minmax(0, 1fr) !important;
}
html body main.app-shell #memoryBottomSheet .full-memory-capsule.memory-sharing-finish .memory-capsule-action-dock > :is(button, .memory-capsule-more) {
  grid-column: auto !important;
  grid-row: 1 !important;
}
html body main.app-shell #memoryBottomSheet .full-memory-capsule.memory-sharing-finish .memory-capsule-more-menu > [data-sheet-action="delete"] {
  color: #9d3c4a !important;
  background: #fff0f1 !important;
}
html body main.app-shell #memoryBottomSheet .full-memory-capsule.memory-sharing-finish .memory-capsule-more-menu > [role="menuitem"]:disabled {
  opacity: .55 !important;
}
html body main.app-shell #memoryBottomSheet .full-memory-capsule.memory-sharing-finish .memory-capsule-more-menu > [role="menuitem"]:focus-visible {
  outline: 3px solid #218c7d !important;
  outline-offset: -3px !important;
  background: #e3f6ef !important;
}
@media (hover: hover) {
  html body main.app-shell #memoryBottomSheet .full-memory-capsule.memory-sharing-finish .memory-capsule-more-menu > [role="menuitem"]:not(:disabled):hover {
    background: #eaf5f4 !important;
  }
}

/* In landscape the photograph and its details share a row. This keeps a
   useful picture without consuming the whole short screen with a tall crop. */
@media (orientation: landscape) and (min-width: 720px) {
  html body main.app-shell #memoryBottomSheet .full-memory-capsule.memory-sharing-finish .memory-capsule-visual.has-cover-photo {
    display: grid !important;
    grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr) !important;
    height: auto !important;
    min-height: 230px !important;
    max-height: none !important;
    background: #00263d !important;
  }
  html body main.app-shell #memoryBottomSheet .full-memory-capsule.memory-sharing-finish .memory-capsule-visual.has-cover-photo .memory-capsule-cover-media {
    grid-column: 1 !important;
    grid-row: 1 !important;
    position: relative !important;
    inset: auto !important;
    min-width: 0 !important;
    min-height: 230px !important;
    height: 100% !important;
  }
  html body main.app-shell #memoryBottomSheet .full-memory-capsule.memory-sharing-finish .memory-capsule-visual.has-cover-photo .memory-capsule-hero {
    /* The old full-width header assigned grid-column:1/-1. Reset its explicit
       placement so the title cannot fall into a clipped second implicit row. */
    grid-column: 2 !important;
    grid-row: 1 !important;
    position: relative !important;
    inset: auto !important;
    min-width: 0 !important;
    min-height: 230px !important;
    height: auto !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 22px !important;
  }
  html body main.app-shell #memoryBottomSheet .full-memory-capsule.memory-sharing-finish .memory-capsule-visual.has-cover-photo .memory-capsule-visual-shade {
    display: none !important;
  }
  html body main.app-shell #memoryBottomSheet .full-memory-capsule.memory-sharing-finish .memory-capsule-visual.has-cover-photo .memory-capsule-title-block h2 {
    font-size: clamp(1.4rem, 2.7vw, 2rem) !important;
  }
}
