/* Keep the final memory action in the form instead of floating over it. */
@media (max-width: 900px) {
  html body .app-shell .memory-editor .editor-actions,
  html body main.app-shell .memory-editor .editor-actions,
  html body.keyboard-open .app-shell .memory-editor .editor-actions,
  html body.keyboard-open main.app-shell .memory-editor .editor-actions,
  html body #memoryEditorActions,
  html body.keyboard-open #memoryEditorActions {
    position: static !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    inset: auto !important;
    float: none !important;
    translate: none !important;
    transform: none !important;
    animation: none !important;
    transition: none !important;
    will-change: auto !important;
    z-index: auto !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    justify-items: center !important;
    width: 100% !important;
    min-height: 0 !important;
    margin: 24px 0 8px !important;
    padding: 22px 16px max(20px, env(safe-area-inset-bottom)) !important;
    gap: 12px !important;
    border: 1px solid rgba(14, 64, 81, 0.08) !important;
    border-radius: 24px !important;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.76), rgba(235, 249, 245, 0.72)) !important;
    box-shadow: 0 14px 34px rgba(14, 64, 81, 0.08) !important;
    backdrop-filter: none !important;
    scroll-snap-align: none !important;
    scroll-margin: 0 !important;
    contain: layout paint !important;
  }

  html body .app-shell .memory-editor .editor-actions .primary-button,
  html body main.app-shell .memory-editor .editor-actions .primary-button,
  html body .app-shell .memory-editor .editor-actions #deleteButton[hidden] + .primary-button,
  html body main.app-shell .memory-editor .editor-actions #deleteButton[hidden] + .primary-button,
  html body #saveMemoryButton,
  html body.keyboard-open #saveMemoryButton {
    position: static !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    inset: auto !important;
    translate: none !important;
    transform: none !important;
    animation: none !important;
    transition: none !important;
    grid-column: 1 !important;
    width: min(100%, 320px) !important;
    min-height: 54px !important;
    margin: 0 auto !important;
    scroll-snap-align: none !important;
    scroll-margin: 0 !important;
  }

  html body .app-shell .memory-editor .editor-actions #deleteButton,
  html body main.app-shell .memory-editor .editor-actions #deleteButton {
    grid-column: 1 !important;
    justify-self: center !important;
  }
}
