/* MyMappi v699: quick capture and saved-place bookmarks. */

html body .capture-choice-dialog {
  width: min(536px, calc(100vw - 28px));
  max-width: none;
  margin: auto;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 28px;
  color: #123d46;
  background: transparent;
  box-shadow: none;
}

html body .capture-choice-dialog::backdrop {
  background:
    radial-gradient(circle at 50% 70%, rgba(49, 181, 146, 0.15), transparent 42%),
    rgba(3, 18, 25, 0.62);
  backdrop-filter: blur(15px) saturate(1.05);
  -webkit-backdrop-filter: blur(15px) saturate(1.05);
}

.capture-choice-panel {
  display: grid;
  gap: 18px;
  width: 100%;
  padding: 25px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 28px;
  background:
    radial-gradient(circle at 12% 0%, rgba(89, 213, 177, 0.16), transparent 32%),
    linear-gradient(155deg, rgba(255, 255, 255, 0.99), rgba(242, 250, 247, 0.98));
  box-shadow:
    0 34px 90px rgba(3, 29, 38, 0.32),
    0 0 0 1px rgba(13, 111, 109, 0.05) inset;
}

.capture-choice-heading {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 40px;
  align-items: start;
  gap: 13px;
}

.capture-choice-mark {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(145deg, #0b7f74, #1aaf82);
  box-shadow: 0 13px 28px rgba(12, 123, 105, 0.22);
}

.capture-choice-mark svg {
  width: 24px;
  height: 24px;
  stroke-width: 2.4;
}

.capture-choice-heading > div {
  display: grid;
  gap: 4px;
}

.capture-choice-heading > div > span {
  color: #188170;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.capture-choice-heading h2 {
  margin: 0;
  color: #103b44;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.35rem, 4.5vw, 1.72rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.capture-choice-heading p {
  max-width: 39ch;
  margin: 2px 0 0;
  color: #60777b;
  font-size: 0.8rem;
  line-height: 1.5;
}

.capture-choice-close {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid rgba(23, 84, 86, 0.12);
  border-radius: 14px;
  color: #386368;
  background: rgba(255, 255, 255, 0.82);
  cursor: pointer;
}

.capture-choice-close svg {
  width: 18px;
  height: 18px;
}

.capture-choice-actions {
  display: grid;
  gap: 10px;
}

.capture-choice-action {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 13px;
  width: 100%;
  min-height: 78px;
  padding: 12px 14px;
  border: 1px solid rgba(29, 103, 99, 0.13);
  border-radius: 20px;
  color: #17434a;
  text-align: left;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 9px 24px rgba(12, 62, 66, 0.055);
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.capture-choice-action:hover,
.capture-choice-action:focus-visible {
  border-color: rgba(19, 143, 119, 0.34);
  outline: 0;
  box-shadow: 0 14px 30px rgba(12, 87, 81, 0.11);
  transform: translateY(-1px);
}

.capture-choice-action.is-primary {
  border-color: rgba(11, 126, 111, 0.18);
  background:
    linear-gradient(135deg, rgba(225, 250, 241, 0.96), rgba(236, 249, 247, 0.92));
}

.capture-choice-action-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 16px;
  color: #087566;
  background: rgba(218, 246, 236, 0.94);
}

.capture-choice-action.is-primary .capture-choice-action-icon {
  color: #fff;
  background: linear-gradient(145deg, #0a7f73, #1aae80);
  box-shadow: 0 10px 20px rgba(10, 118, 101, 0.18);
}

.capture-choice-action-icon svg {
  width: 21px;
  height: 21px;
}

.capture-choice-action > span:nth-child(2) {
  display: grid;
  gap: 3px;
}

.capture-choice-action strong {
  font-size: 0.96rem;
  font-weight: 900;
}

.capture-choice-action small {
  color: #698084;
  font-size: 0.74rem;
  line-height: 1.4;
}

.capture-choice-action > svg {
  width: 18px;
  height: 18px;
  color: #6b898a;
}

.capture-choice-saved {
  display: flex;
  width: 100%;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 8px 12px;
  border: 0;
  border-radius: 16px;
  color: #76501f;
  background: rgba(250, 237, 211, 0.68);
  cursor: pointer;
}

.capture-choice-saved[hidden] {
  display: none !important;
}

.capture-choice-saved > svg {
  width: 19px;
  height: 19px;
}

.capture-choice-saved > span {
  display: grid;
  gap: 1px;
  text-align: left;
}

.capture-choice-saved strong {
  font-size: 0.76rem;
}

.capture-choice-saved small {
  color: rgba(106, 73, 31, 0.72);
  font-size: 0.68rem;
}

/* Quick capture reuses MyMappi's proven private media uploader, but presents
   only the fields needed to remember a place in a few seconds. */
html body .app-shell #memoryForm.memory-editor.is-save-for-later {
  display: flex;
  width: min(520px, 100%);
  flex-direction: column;
  border-left-color: rgba(181, 109, 40, 0.22);
  background:
    radial-gradient(circle at 12% 0%, rgba(229, 177, 90, 0.11), transparent 30%),
    #fbfdfc;
}

#memoryForm.is-save-for-later > .editor-header { order: 0; }
#memoryForm.is-save-for-later > .memory-flow-place { order: 1; }
#memoryForm.is-save-for-later > .memory-flow-media { order: 2; }
#memoryForm.is-save-for-later > .memory-flow-story { order: 3; }
#memoryForm.is-save-for-later > .editor-actions { order: 4; }

#memoryForm.is-save-for-later .memory-editor-progress,
#memoryForm.is-save-for-later .active-trip-editor-chip,
#memoryForm.is-completing-saved-place .active-trip-editor-chip,
#memoryForm.is-save-for-later .first-memory-details-toggle,
#memoryForm.is-save-for-later .memory-flow-feeling,
#memoryForm.is-save-for-later .memory-flow-place > .two-col,
#memoryForm.is-save-for-later .memory-people-chips,
#memoryForm.is-save-for-later .favorite-toggle,
#memoryForm.is-save-for-later .memory-media-advanced,
#memoryForm.is-save-for-later .memory-optional-fields,
#memoryForm.is-save-for-later #memoryVideoPickButton,
#memoryForm.is-save-for-later .memory-flow-step,
#memoryForm.is-save-for-later #deleteButton:not(:where([hidden])) span[data-icon] {
  display: none !important;
}

#memoryForm.is-save-for-later .memory-flow-panel {
  margin: 0 18px 12px;
  border: 1px solid rgba(85, 122, 116, 0.12);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 10px 26px rgba(18, 78, 76, 0.045);
}

#memoryForm.is-save-for-later .memory-flow-media {
  border-color: rgba(181, 109, 40, 0.15);
  background: linear-gradient(145deg, rgba(255, 249, 237, 0.96), rgba(247, 252, 249, 0.95));
}

#memoryForm.is-save-for-later .memory-media-dropzone {
  min-height: 150px;
  border-color: rgba(181, 109, 40, 0.22);
  background: rgba(255, 255, 255, 0.72);
}

#memoryForm.is-save-for-later #memoryPhotoPickButton {
  min-height: 46px;
  padding-inline: 18px;
  border-color: transparent;
  color: #fff;
  background: linear-gradient(135deg, #9f6429, #c9893c);
  box-shadow: 0 11px 22px rgba(150, 89, 30, 0.18);
}

#memoryForm.is-save-for-later .memory-title-field,
#memoryForm.is-save-for-later .memory-story-field {
  color: #315a5d;
  font-weight: 850;
}

#memoryForm.is-save-for-later .mappi-story-tip {
  margin-bottom: 0;
}

#memoryForm.is-save-for-later .editor-actions {
  margin-top: 2px;
  padding-top: 8px;
}

#memoryForm.is-save-for-later #saveMemoryButton {
  width: min(100%, 310px);
  min-height: 50px;
  margin-inline: auto;
  border-radius: 17px;
  background: linear-gradient(135deg, #8d5926, #bc7b34);
  box-shadow: 0 15px 30px rgba(132, 75, 25, 0.2);
}

#memoryForm.is-save-for-later .save-memory-note {
  max-width: 36ch;
  margin-inline: auto;
  color: #7b6d5a;
  text-align: center;
}

#memoryForm.is-save-for-later .save-memory-note.is-error {
  width: min(100%, 34ch);
  padding: 9px 12px;
  border: 1px solid rgba(174, 72, 53, 0.17);
  border-radius: 13px;
  color: #8b3f33;
  background: rgba(255, 244, 239, 0.9);
  font-weight: 760;
  line-height: 1.4;
}

/* Saved places look intentionally different from completed memories. */
html body .app-shell .mymappi-pin-only.is-saved-for-later .memory-pin-body,
html body .app-shell .mymappi-pin-only.is-saved-for-later .memory-pin-inner {
  fill: #b56d28 !important;
}

html body .app-shell .mymappi-pin-only.is-saved-for-later .memory-pin-rim {
  stroke-dasharray: 3 2;
}

html body .app-shell .mymappi-pin-only.is-saved-for-later .memory-pin-center {
  fill: #fff8e9 !important;
}

html body .app-shell .mymappi-pin-only.is-saved-for-later .memory-pin-core {
  fill: #b56d28 !important;
}

html body .app-shell .mymappi-pin-only.is-saved-for-later .memory-pin-symbol {
  fill: #fff8e9 !important;
  font-size: 12px !important;
}

.saved-place-capsule-callout {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin: 0 0 17px;
  padding: 14px;
  border: 1px solid rgba(181, 109, 40, 0.16);
  border-radius: 19px;
  color: #68461f;
  background: linear-gradient(135deg, rgba(255, 247, 228, 0.97), rgba(250, 252, 247, 0.94));
}

.saved-place-capsule-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(145deg, #9d6129, #c78436);
}

.saved-place-capsule-icon svg {
  width: 20px;
  height: 20px;
}

.saved-place-capsule-callout > span:nth-child(2) {
  display: grid;
  gap: 2px;
}

.saved-place-capsule-callout small {
  color: #a26b2e;
  font-size: 0.63rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.saved-place-capsule-callout strong {
  color: #573a1b;
  font-size: 0.86rem;
}

.saved-place-capsule-callout em {
  color: #7b6b58;
  font-size: 0.7rem;
  font-style: normal;
}

.saved-place-capsule-callout button {
  min-height: 44px;
  padding: 0 15px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 900;
  white-space: nowrap;
  background: linear-gradient(135deg, #8d5725, #bd7b32);
  box-shadow: 0 10px 22px rgba(135, 76, 27, 0.18);
  cursor: pointer;
}

@media (max-width: 640px) {
  html body .capture-choice-dialog {
    width: calc(100vw - 18px);
    margin-top: auto;
    margin-bottom: max(9px, env(safe-area-inset-bottom));
    border-radius: 26px;
  }

  .capture-choice-panel {
    gap: 14px;
    padding: 20px 16px 17px;
    border-radius: 26px;
  }

  .capture-choice-heading {
    grid-template-columns: 46px minmax(0, 1fr) 40px;
    gap: 11px;
  }

  .capture-choice-mark {
    width: 46px;
    height: 46px;
    border-radius: 15px;
  }

  .capture-choice-action {
    grid-template-columns: 44px minmax(0, 1fr) 18px;
    min-height: 72px;
    padding: 10px 12px;
    border-radius: 18px;
  }

  .capture-choice-action-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
  }

  .saved-place-capsule-callout {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .saved-place-capsule-icon {
    width: 42px;
    height: 42px;
  }

  .saved-place-capsule-callout button {
    grid-column: 1 / -1;
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .capture-choice-action {
    transition: none !important;
  }
}

/* Direct, dependable access to every place waiting on the map. */
.saved-place-index-card {
  display: block;
  width: min(680px, 100%);
  margin: 0 auto;
  padding: 22px;
  border: 1px solid rgba(163, 112, 52, 0.18);
  background:
    radial-gradient(circle at 12% 0%, rgba(244, 190, 102, 0.2), transparent 34%),
    linear-gradient(160deg, rgba(255, 255, 252, 0.99), rgba(246, 252, 249, 0.98));
}

.saved-place-index-heading {
  display: grid;
  width: 100%;
  grid-template-columns: 48px minmax(0, 1fr) 42px;
  align-items: start;
  gap: 13px;
  padding: 4px 2px 18px;
}

.saved-place-index-heading-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 17px;
  color: #8e561e;
  background: linear-gradient(145deg, #fff4d9, #f0c37b);
  box-shadow: 0 10px 22px rgba(145, 94, 29, 0.16);
}

.saved-place-index-heading-mark svg {
  width: 22px;
  height: 22px;
}

.saved-place-index-heading small,
.saved-place-index-copy > small {
  display: block;
  color: #a2672a;
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.saved-place-index-heading h2 {
  margin: 3px 0 2px;
  color: #103e48;
  font-size: clamp(1.45rem, 5vw, 2rem);
  line-height: 1.05;
}

.saved-place-index-heading p {
  margin: 0;
  color: #607c82;
  font-size: 0.9rem;
  line-height: 1.4;
}

.saved-place-index-close {
  position: static;
  width: 40px;
  height: 40px;
  color: #244e57;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(62, 101, 107, 0.14);
  box-shadow: 0 7px 18px rgba(25, 67, 73, 0.1);
}

.saved-place-index-list {
  display: grid;
  gap: 11px;
  max-height: min(58vh, 540px);
  overflow-y: auto;
  padding: 2px 2px 5px;
  overscroll-behavior: contain;
}

.saved-place-index-item {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 13px;
  width: 100%;
  min-height: 88px;
  padding: 8px 12px 8px 8px;
  border: 1px solid rgba(71, 121, 124, 0.13);
  border-radius: 22px;
  color: #123f48;
  text-align: left;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 9px 24px rgba(25, 68, 73, 0.08);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.saved-place-index-item:hover,
.saved-place-index-item:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(24, 146, 135, 0.34);
  box-shadow: 0 13px 28px rgba(25, 68, 73, 0.13);
}

.saved-place-index-media {
  position: relative;
  display: grid;
  width: 78px;
  height: 72px;
  place-items: center;
  overflow: hidden;
  border-radius: 18px;
  color: #955d20;
  background: linear-gradient(145deg, #fff0cb, #e6b766);
}

.saved-place-index-media svg {
  width: 25px;
  height: 25px;
}

.saved-place-index-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.saved-place-index-media small {
  position: absolute;
  left: 7px;
  bottom: 7px;
  padding: 3px 7px;
  border-radius: 999px;
  color: #fff;
  font-size: 0.58rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(8, 43, 50, 0.72);
  backdrop-filter: blur(8px);
}

.saved-place-index-copy {
  min-width: 0;
}

.saved-place-index-copy strong,
.saved-place-index-copy span,
.saved-place-index-copy em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.saved-place-index-copy strong {
  margin-top: 2px;
  font-size: 1.02rem;
}

.saved-place-index-copy span {
  margin-top: 2px;
  color: #55747a;
  font-size: 0.78rem;
}

.saved-place-index-copy em {
  margin-top: 5px;
  color: #6e7470;
  font-size: 0.78rem;
  font-style: normal;
}

.saved-place-index-arrow {
  display: grid;
  place-items: center;
  color: #13877e;
}

.saved-place-index-arrow svg {
  width: 19px;
  height: 19px;
}

@media (max-width: 720px) {
  .memory-bottom-sheet.saved-place-index-open {
    padding-top: max(58px, calc(env(safe-area-inset-top) + 38px));
  }

  .saved-place-index-card {
    padding: 16px 13px max(18px, env(safe-area-inset-bottom));
    border-radius: 28px 28px 0 0;
  }

  .saved-place-index-heading {
    grid-template-columns: 42px minmax(0, 1fr) 38px;
    gap: 10px;
    padding-bottom: 14px;
  }

  .saved-place-index-heading-mark {
    width: 42px;
    height: 42px;
    border-radius: 15px;
  }

  .saved-place-index-heading p {
    font-size: 0.82rem;
  }

  .saved-place-index-close {
    width: 36px;
    height: 36px;
  }

  .saved-place-index-list {
    max-height: min(62vh, 520px);
  }

  .saved-place-index-item {
    grid-template-columns: 68px minmax(0, 1fr) 20px;
    min-height: 80px;
    gap: 11px;
    border-radius: 20px;
  }

  .saved-place-index-media {
    width: 68px;
    height: 64px;
    border-radius: 16px;
  }
}

/* A chosen quick-place photo should look like the cover it will become. */
html body .app-shell #memoryForm.is-save-for-later .memory-media-preview,
html body main.app-shell #memoryForm#memoryForm.is-save-for-later .memory-media-preview {
  display: flex !important;
  justify-content: center;
  min-height: 0 !important;
  padding-top: 3px;
}

html body .app-shell #memoryForm.is-save-for-later .memory-media-thumb,
html body main.app-shell #memoryForm.is-save-for-later .memory-media-thumb {
  width: min(100%, 204px) !important;
  height: 136px !important;
  border: 2px solid rgba(255, 255, 255, 0.92) !important;
  border-radius: 19px !important;
  background: #0b3f4b !important;
  box-shadow: 0 12px 26px rgba(12, 70, 74, 0.15) !important;
}

html body .app-shell #memoryForm.is-save-for-later .memory-media-thumb img,
html body main.app-shell #memoryForm.is-save-for-later .memory-media-thumb img {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  object-position: center center !important;
}

html body .app-shell #memoryForm.is-save-for-later .memory-media-thumb small,
html body main.app-shell #memoryForm.is-save-for-later .memory-media-thumb small {
  right: auto;
  bottom: 10px;
  left: 10px;
  padding: 6px 10px;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(4, 37, 45, 0.8);
  backdrop-filter: blur(8px);
}

html body .app-shell #memoryForm.is-save-for-later .memory-media-remove,
html body main.app-shell #memoryForm.is-save-for-later .memory-media-remove {
  top: 9px;
  right: 9px;
  width: 29px;
  height: 29px;
  font-size: 1rem;
}

@media (max-width: 430px) {
  html body .app-shell #memoryForm.is-save-for-later .memory-media-thumb,
  html body main.app-shell #memoryForm.is-save-for-later .memory-media-thumb {
    width: min(100%, 184px) !important;
    height: 128px !important;
  }
}
