/* Create, edit and relive share the current MyMappi palette. Deliberately
   leave viewport recovery, photo crops, hidden states and save logic alone. */
html body main.app-shell section.map-stage #memoryForm#memoryForm {
  color: var(--mymappi-action-navy, #00243f) !important;
  background: linear-gradient(145deg, #f0f8fb, #f3faf5) !important;
  border-color: #d2e5e6 !important;
  box-shadow: 0 18px 52px rgba(0, 36, 63, .16) !important;
  scrollbar-color: #a7c8cc transparent;
  scrollbar-width: thin;
}

html body main.app-shell section.map-stage #memoryForm#memoryForm .editor-header {
  color: #00243f !important;
  border-bottom: 0 !important;
  background: linear-gradient(145deg, #f0f8fb, #f3faf5) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: none !important;
}

html body main.app-shell section.map-stage #memoryForm#memoryForm #editorMode {
  padding: 6px 12px !important;
  border: 1px solid #c2dfd9 !important;
  border-radius: 999px !important;
  background: #e4f4ed !important;
  color: #16594f !important;
  font-size: 11px !important;
  letter-spacing: .1em !important;
}

html body main.app-shell section.map-stage #memoryForm#memoryForm #editorTitle {
  color: #00243f !important;
  font-size: clamp(25px, 3.5vw, 32px) !important;
  line-height: 1.15 !important;
  letter-spacing: -.025em !important;
  text-wrap: balance;
}

html body main.app-shell section.map-stage #memoryForm#memoryForm .editor-promise {
  display: block;
  max-width: 42ch;
  margin: 8px auto 0 !important;
  color: #4c6977 !important;
  font-size: 14px !important;
  line-height: 1.45 !important;
  font-weight: 500 !important;
}

html body main.app-shell section.map-stage #memoryForm#memoryForm #closeEditor {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  color: #00243f !important;
  background: #fff !important;
  border: 1px solid #c8dfe3 !important;
  border-radius: 50% !important;
  box-shadow: none !important;
}

html body main.app-shell section.map-stage #memoryForm#memoryForm .memory-editor-progress {
  width: min(100%, var(--memory-form-content)) !important;
  margin: 12px auto 4px !important;
  padding: 6px !important;
  border-color: #d2e5e6 !important;
  border-radius: 14px !important;
  background: rgba(255, 255, 255, .8) !important;
  box-shadow: none !important;
}
html body main.app-shell section.map-stage #memoryForm#memoryForm .memory-editor-progress > span {
  color: #536d78 !important;
  padding: 7px !important;
  font-size: 12px !important;
  line-height: 1.25 !important;
}
html body main.app-shell section.map-stage #memoryForm#memoryForm .memory-editor-progress > span.active {
  color: #00243f !important;
  background: #dff3ed !important;
  border-color: #bcded5 !important;
}

html body main.app-shell section.map-stage #memoryForm#memoryForm .memory-flow-panel {
  border: 1px solid #d1e4e7 !important;
  border-radius: 22px !important;
  background: rgba(255, 255, 255, .9) !important;
  box-shadow: 0 4px 16px rgba(0, 36, 63, .025) !important;
}
html body main.app-shell section.map-stage #memoryForm#memoryForm :is(.memory-flow-step, .memory-flow-substep) {
  color: #245d5a !important;
  background: #ecf7f3 !important;
  border-color: #d2e7df !important;
  font-size: 11px !important;
  letter-spacing: .09em !important;
}
html body main.app-shell section.map-stage #memoryForm#memoryForm label {
  color: #244c5e !important;
  font-size: 13px !important;
  line-height: 1.45 !important;
}
html body main.app-shell section.map-stage #memoryForm#memoryForm :is(input:not([type="checkbox"]):not([type="hidden"]):not([type="file"]), select, textarea) {
  color: #00243f !important;
  background-color: #fff !important;
  border-color: #cbdfe4 !important;
  font-size: 16px !important;
  line-height: 1.45 !important;
  box-shadow: none !important;
}
html body main.app-shell section.map-stage #memoryForm#memoryForm :is(input, textarea)::placeholder {
  color: #657d88 !important;
  opacity: 1 !important;
}
html body main.app-shell section.map-stage #memoryForm#memoryForm :is(input:not([type="checkbox"]):not([type="hidden"]):not([type="file"]), select) {
  min-height: 46px !important;
}
html body main.app-shell section.map-stage #memoryForm#memoryForm :is(.memory-place-search-row, .memory-companion-picker, .memory-pin-preview-card, .location-confidence) {
  box-shadow: none !important;
}
html body main.app-shell section.map-stage #memoryForm#memoryForm :is(.memory-location-hint, .mappi-story-tip, .field-hint, .memory-companion-picker-copy small) {
  color: #536e7b !important;
  font-size: 12px !important;
  line-height: 1.5 !important;
}
html body main.app-shell section.map-stage #memoryForm#memoryForm .memory-media-dropzone {
  border: 1px dashed #a7cbd0 !important;
  background: linear-gradient(135deg, #eff8fb, #eef8f2) !important;
  box-shadow: none !important;
}
html body main.app-shell section.map-stage #memoryForm#memoryForm .memory-media-dropzone-copy strong {
  color: #00243f !important;
  font-size: 18px !important;
}
html body main.app-shell section.map-stage #memoryForm#memoryForm .memory-media-dropzone-copy small {
  color: #536e7b !important;
  font-size: 13px !important;
  line-height: 1.5 !important;
}
html body main.app-shell section.map-stage #memoryForm#memoryForm :is(.secondary-button, .first-memory-details-toggle, .memory-media-advanced > summary) {
  min-height: 44px !important;
  color: #00243f !important;
  background: #f8fcfa !important;
  border-color: #c3dce0 !important;
  box-shadow: none !important;
  font-size: 13px !important;
}
html body main.app-shell section.map-stage #memoryForm#memoryForm #memoryEditorActions {
  width: min(100%, var(--memory-form-content)) !important;
  margin-inline: auto !important;
  border-color: #d1e4e7 !important;
  background: #f3faf7 !important;
  box-shadow: none !important;
}
html body main.app-shell section.map-stage #memoryForm#memoryForm #saveMemoryButton {
  min-height: 52px !important;
  border-radius: 16px !important;
  font-size: 16px !important;
  box-shadow: 0 6px 16px rgba(0, 36, 63, .1) !important;
}

/* Capsule: photo first, clear context, then the actual story. No cover sizing
   or object-position override: the owner's chosen framing remains authoritative. */
html body main.app-shell #memoryBottomSheet .full-memory-capsule {
  background: linear-gradient(145deg, #f0f8fb, #f3faf5) !important;
  border-color: #d2e5e6 !important;
}
html body main.app-shell #memoryBottomSheet .full-memory-capsule .memory-capsule-topbar {
  background: #00243f !important;
  border-bottom: 1px solid rgba(255, 255, 255, .12) !important;
  box-shadow: none !important;
}
html body main.app-shell #memoryBottomSheet .full-memory-capsule .memory-capsule-brand {
  flex-wrap: wrap;
  gap: 5px 10px !important;
  color: #f7fcff !important;
  font-size: 11px !important;
}
html body main.app-shell #memoryBottomSheet .full-memory-capsule .memory-capsule-privacy {
  color: #c4e6df !important;
  font-size: 11px !important;
}
html body main.app-shell #memoryBottomSheet .full-memory-capsule .memory-capsule-close {
  color: #fff !important;
  background: #14394e !important;
  border-color: #4e6c7e !important;
  box-shadow: none !important;
}
/* Each slide owns its count, so swiping updates it without a second counter
   or a scroll listener. Keep it on the photo, below the close/header lane. */
html body main.app-shell #memoryBottomSheet .full-memory-capsule .memory-capsule-photo-count {
  top: 84px !important;
  right: 16px !important;
  bottom: auto !important;
  left: auto !important;
  min-height: 30px !important;
  padding: 6px 10px !important;
  gap: 6px !important;
  border: 1px solid rgba(255, 255, 255, .28) !important;
  border-radius: 999px !important;
  background: #00243f !important;
  color: #fff !important;
  font-size: 12px !important;
  font-weight: 650 !important;
  line-height: 1.25 !important;
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em !important;
  box-shadow: 0 2px 8px rgba(0, 20, 36, .12) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  pointer-events: none !important;
}
html body main.app-shell #memoryBottomSheet .full-memory-capsule .memory-capsule-memory-seal {
  display: flex !important;
  flex-wrap: wrap;
  gap: 7px 16px !important;
  font-size: 13px !important;
  line-height: 1.5 !important;
  font-weight: 550 !important;
  text-wrap: pretty !important;
}
html body main.app-shell #memoryBottomSheet .full-memory-capsule .memory-capsule-meta-item {
  display: inline-flex;
  align-items: flex-start;
  gap: 7px;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}
html body main.app-shell #memoryBottomSheet .full-memory-capsule .memory-capsule-meta-item > svg {
  flex: 0 0 15px !important;
  width: 15px !important;
  height: 15px !important;
  margin-top: 2px;
  color: #c4e6df;
}
html body main.app-shell #memoryBottomSheet .full-memory-capsule .memory-capsule-inside {
  padding-top: 22px !important;
  gap: 16px !important;
}
html body main.app-shell #memoryBottomSheet .full-memory-capsule .memory-capsule-inside-heading {
  padding: 0 !important;
  min-height: 0 !important;
  border: 0 !important;
  background: none !important;
  box-shadow: none !important;
}
html body main.app-shell #memoryBottomSheet .full-memory-capsule .memory-capsule-inside-heading::before {
  content: none !important;
  display: none !important;
}
html body main.app-shell #memoryBottomSheet .full-memory-capsule .memory-capsule-inside-heading > span {
  color: #386b66 !important;
  font-size: 11px !important;
}
html body main.app-shell #memoryBottomSheet .full-memory-capsule .memory-capsule-inside-heading h3 {
  color: #00243f !important;
  font-size: 18px !important;
  line-height: 1.35 !important;
}
html body main.app-shell #memoryBottomSheet .full-memory-capsule .memory-capsule-story {
  padding: 18px 0 !important;
  border-color: #d2e4e5 !important;
}
html body main.app-shell #memoryBottomSheet .full-memory-capsule .memory-capsule-story p {
  color: #244856 !important;
  font-size: clamp(16px, 1.5vw, 18px) !important;
  line-height: 1.7 !important;
  font-weight: 450 !important;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
html body main.app-shell #memoryBottomSheet .full-memory-capsule .memory-capsule-inside-card {
  padding: 18px !important;
  border: 1px solid #d2e4e5 !important;
  border-radius: 18px !important;
  background: #fbfefd !important;
  box-shadow: none !important;
}
html body main.app-shell #memoryBottomSheet .full-memory-capsule .memory-capsule-inside-card :is(p, blockquote) {
  color: #244856 !important;
  font-size: 16px !important;
  line-height: 1.6 !important;
  overflow-wrap: anywhere;
}
html body main.app-shell #memoryBottomSheet .full-memory-capsule .memory-capsule-action-dock {
  background: #f4faf8 !important;
  border-top: 1px solid #cfdee2 !important;
  box-shadow: 0 -4px 18px rgba(0, 36, 63, .04) !important;
}
html body main.app-shell #memoryBottomSheet .full-memory-capsule .memory-capsule-dock-action {
  min-height: 56px !important;
  border-radius: 15px !important;
  box-shadow: none !important;
}
html body main.app-shell #memoryBottomSheet .full-memory-capsule .memory-capsule-dock-label {
  font-size: 12px !important;
  line-height: 1.25 !important;
}
html body main.app-shell #memoryBottomSheet .full-memory-capsule .memory-capsule-more-menu {
  padding: 8px !important;
  color: #00243f !important;
  border: 1px solid #c7dfe3 !important;
  border-radius: 18px !important;
  background: #f7fcfa !important;
  box-shadow: 0 10px 32px rgba(0, 36, 63, .18) !important;
}
html body main.app-shell #memoryBottomSheet .full-memory-capsule .memory-capsule-more-menu button {
  min-height: 44px !important;
  font-size: 13px !important;
  line-height: 1.35 !important;
  box-shadow: none !important;
}
html body main.app-shell #memoryBottomSheet .full-memory-capsule .memory-capsule-more-menu .memory-capsule-send-action {
  color: #00243f !important;
  background: #f0f8f5 !important;
  border-color: #d2e4e5 !important;
}

html body main.app-shell section.map-stage #memoryForm#memoryForm :is(button, input, textarea, select, summary):focus-visible {
  outline: 2px solid #217c79 !important;
  outline-offset: 3px !important;
}
html body main.app-shell #memoryBottomSheet .full-memory-capsule :is(button, summary, [tabindex]):focus-visible {
  outline: 3px solid #65cdb8 !important;
  outline-offset: 2px !important;
}

@media (max-width: 720px) {
  html body main.app-shell section.map-stage #memoryForm#memoryForm .editor-promise {
    max-width: 30ch;
    font-size: 13px !important;
  }
  html body main.app-shell section.map-stage #memoryForm#memoryForm .memory-editor-progress > span {
    padding: 6px 2px !important;
    font-size: 11px !important;
  }
  html body main.app-shell #memoryBottomSheet .full-memory-capsule .memory-capsule-meta-item {
    font-size: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html body main.app-shell section.map-stage #memoryForm#memoryForm,
  html body main.app-shell #memoryBottomSheet .full-memory-capsule {
    scroll-behavior: auto !important;
  }
}

/* The pin preview is a compact invitation into the same capsule, not a second
   action menu. Retain its photo/focus and only expose the existing controls. */
html body main.app-shell #memoryBottomSheet.memory-capsule-preview-open {
  background: rgba(0, 27, 46, .38) !important;
  backdrop-filter: blur(6px) !important;
  -webkit-backdrop-filter: blur(6px) !important;
}
html body main.app-shell #memoryBottomSheet .memory-capsule-preview-surface {
  border-color: #cadfe2;
  border-radius: 28px;
  corner-shape: round;
  background: #00243f;
  box-shadow: 0 16px 38px rgba(0, 27, 46, .22);
  transform: none;
  min-block-size: min-content;
}
html body main.app-shell #memoryBottomSheet .memory-capsule-preview {
  aspect-ratio: auto !important;
  min-block-size: min(430px, calc(100vw - 32px));
}
html body main.app-shell #memoryBottomSheet .memory-capsule-preview-atmosphere,
html body main.app-shell #memoryBottomSheet .memory-capsule-preview-surface::after {
  display: none;
}
html body main.app-shell #memoryBottomSheet .memory-capsule-preview-photo-shade {
  /* Keep even a bright photo readable behind the title and compact metadata. */
  background: linear-gradient(180deg, rgba(0, 23, 39, .12) 0%, rgba(0, 23, 39, .66) 22%, rgba(0, 23, 39, .82) 60%, rgba(0, 23, 39, .94) 100%);
}
html body main.app-shell #memoryBottomSheet .memory-capsule-preview-photo {
  transform: none;
}
html body main.app-shell #memoryBottomSheet .memory-capsule-preview-media {
  background: #00243f;
}
html body main.app-shell #memoryBottomSheet .memory-capsule-preview-no-photo-art {
  background: none;
  place-items: start center;
  padding-top: 74px;
}
html body main.app-shell #memoryBottomSheet .memory-capsule-preview-no-photo-mark {
  inline-size: 94px;
  border: 0;
  background: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  margin-block-start: 0;
}
html body main.app-shell #memoryBottomSheet .memory-capsule-preview--no-photo .memory-capsule-preview-copy {
  padding-block-start: 110px;
}
html body main.app-shell #memoryBottomSheet .memory-capsule-preview-no-photo-mark img {
  inline-size: 100%;
  block-size: 100%;
}
html body main.app-shell #memoryBottomSheet .memory-capsule-preview-content {
  padding: 18px;
  gap: 14px;
  grid-template-rows: auto minmax(min-content, 1fr) auto;
}
html body main.app-shell #memoryBottomSheet .memory-capsule-preview-top-actions {
  position: static;
  flex-shrink: 0;
  gap: 6px;
}
html body main.app-shell #memoryBottomSheet .memory-capsule-preview-privacy {
  color: #e0f3ec;
  background: #00243f;
  font-size: 11px;
  font-weight: 650;
  padding: 7px 9px;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
html body main.app-shell #memoryBottomSheet :is(.memory-capsule-preview-close, .memory-capsule-preview-heart:not([aria-pressed="true"])) {
  color: #fff;
  background: #12384e;
  border-color: #65808f;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
html body main.app-shell #memoryBottomSheet .memory-capsule-preview-title {
  max-inline-size: 100%;
  font-size: clamp(24px, 6cqi, 28px);
  line-height: 1.18;
  text-wrap: pretty;
  letter-spacing: -.025em;
}
html body main.app-shell #memoryBottomSheet .memory-capsule-preview-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  color: #e1eeef;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 450;
}
html body main.app-shell #memoryBottomSheet .memory-capsule-preview-meta-item {
  max-inline-size: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
}
html body main.app-shell #memoryBottomSheet .memory-capsule-preview-meta-label {
  min-width: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
html body main.app-shell #memoryBottomSheet .memory-capsule-preview-meta-item svg {
  display: block;
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  color: #b8ded8;
}
html body main.app-shell #memoryBottomSheet .memory-capsule-preview-copy {
  gap: 14px;
  padding-top: 20px;
  text-shadow: 0 1px 6px #001727;
}
html body main.app-shell #memoryBottomSheet .memory-capsule-preview-chips {
  gap: 8px;
}
html body main.app-shell #memoryBottomSheet .memory-capsule-preview-meta-item + .memory-capsule-preview-meta-item::before {
  content: none;
}
html body main.app-shell #memoryBottomSheet .memory-capsule-preview-hook {
  font-size: 14px;
  line-height: 1.45;
  font-weight: 450;
}
html body main.app-shell #memoryBottomSheet .memory-capsule-preview-chip {
  font-size: 11px;
  background: rgba(0, 36, 63, .72);
  color: #e3f3ed;
}
html body main.app-shell #memoryBottomSheet .memory-capsule-preview-footer {
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}
html body main.app-shell #memoryBottomSheet .memory-capsule-preview-saved {
  justify-self: center;
  background: #def3e8;
  color: #18594a;
}
html body main.app-shell #memoryBottomSheet .memory-capsule-preview .memory-capsule-preview-open {
  width: 100%;
  min-height: 48px;
  border-radius: 15px;
  border-color: #7290a0;
  color: #fff;
  background: #00243f;
  box-shadow: none;
  font-size: 14px;
  transform: none;
}
html body main.app-shell #memoryBottomSheet .memory-capsule-preview :is(button):focus-visible {
  outline: 3px solid #65cdb8;
  outline-offset: 2px;
}
@media (max-width: 370px) {
  html body main.app-shell #memoryBottomSheet .memory-capsule-preview-content {
    padding: 14px;
    gap: 10px;
  }
  html body main.app-shell #memoryBottomSheet .memory-capsule-preview-privacy {
    font-size: 10px;
    padding: 7px;
  }
}
