/* Memory Lane entry: one bounded reading area beneath the shared header.
   Only this archive surface changes; photos, editors, map panels and account
   data keep their existing rendering and behavior. The measured top/bottom
   values come from the shared chrome, with safe-area fallbacks before layout. */
html body main.app-shell > section.map-stage.memories-focus {
  background: #edf5fa !important;
}

html body main.app-shell > section.map-stage.memories-focus > #memoryLanePage.memory-database-page.side-panel {
  --lane-entry-gutter: clamp(12px, 3vw, 40px);
  position: absolute !important;
  inset: auto 0 !important;
  top: var(--memory-lane-content-top, calc(max(10px, env(safe-area-inset-top)) + 66px)) !important;
  bottom: var(--memory-lane-content-bottom, calc(var(--bottom-nav-height, 78px) + env(safe-area-inset-bottom) + 24px)) !important;
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 4px var(--lane-entry-gutter) 20px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
  scrollbar-gutter: stable both-edges !important;
  scroll-padding-block: 10px 20px !important;
  border: 0 !important;
  background: #edf5fa !important;
}

/* Keep the page title in ordinary flow. It leaves with the content when
   browsing, never floats across a memory, and cannot slide under the logo. */
html body main.app-shell > section.map-stage.memories-focus > #memoryLanePage.memory-database-page.side-panel > .memory-lane-toolbar {
  position: relative !important;
  top: auto !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 14px !important;
  padding: 0 !important;
  margin-block: 0 14px !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
html body main.app-shell > section.map-stage.memories-focus > #memoryLanePage.memory-database-page.side-panel .memory-hub-heading {
  position: static !important;
  align-items: center !important;
  min-height: 44px !important;
  gap: 12px !important;
  margin: 0 !important;
}
html body main.app-shell > section.map-stage.memories-focus > #memoryLanePage.memory-database-page.side-panel .memory-hub-actions {
  position: static !important;
  flex: 0 0 auto !important;
  transform: none !important;
  margin: 0 !important;
}
html body main.app-shell > section.map-stage.memories-focus > #memoryLanePage.memory-database-page.side-panel #closeMemoriesButton {
  position: static !important;
  width: 44px !important;
  min-width: 44px !important;
  height: 44px !important;
  min-height: 44px !important;
  transform: none !important;
}
html body main.app-shell > section.map-stage.memories-focus > #memoryLanePage.memory-database-page.side-panel .memory-hub-title h2 {
  font-size: clamp(1.5rem, 2.5vw, 1.875rem) !important;
  line-height: 1.2 !important;
  overflow-wrap: anywhere !important;
}
html body main.app-shell > section.map-stage.memories-focus > #memoryLanePage.memory-database-page.side-panel .memory-hub-title p {
  display: block !important;
  margin-top: 4px !important;
  font-size: .8125rem !important;
  line-height: 1.45 !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
}
html body main.app-shell > section.map-stage.memories-focus > #memoryLanePage.memory-database-page.side-panel .memory-lane-search {
  min-height: 48px !important;
  border-color: #c4dce0 !important;
  border-radius: 15px !important;
  padding-inline: 14px !important;
  background: #fbfefd !important;
}
html body main.app-shell > section.map-stage.memories-focus > #memoryLanePage.memory-database-page.side-panel #searchInput {
  min-height: 46px !important;
  font-size: max(16px, 1rem) !important;
  line-height: 1.4 !important;
}

/* Views and filters have distinct, quiet treatments instead of stacked
   oversized capsules. Intrinsic rem columns wrap at larger text sizes. */
html body main.app-shell > section.map-stage.memories-focus > #memoryLanePage.memory-database-page.side-panel > .memory-lane-view-tabs {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 4.25rem), 1fr)) !important;
  align-items: stretch !important;
  gap: 2px !important;
  padding: 3px !important;
  margin-block: 0 8px !important;
  overflow: visible !important;
  border: 1px solid #d7e6e8 !important;
  border-radius: 14px !important;
  background: #e8f2f5 !important;
}
html body main.app-shell > section.map-stage.memories-focus > #memoryLanePage.memory-database-page.side-panel .memory-lane-view-tabs .tab {
  min-height: 44px !important;
  height: auto !important;
  padding: 10px 3px !important;
  border: 0 !important;
  border-radius: 10px !important;
  font-size: .75rem !important;
  line-height: 1.35 !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  box-shadow: none !important;
}
html body main.app-shell > section.map-stage.memories-focus > #memoryLanePage.memory-database-page.side-panel .memory-lane-view-tabs .tab.active {
  color: #00243f !important;
  background: #fbfefd !important;
  box-shadow: 0 2px 7px #00243f0b !important;
}
html body main.app-shell > section.map-stage.memories-focus > #memoryLanePage.memory-database-page.side-panel > .memory-lane-browse {
  margin-block: 0 10px !important;
}
html body main.app-shell > section.map-stage.memories-focus > #memoryLanePage.memory-database-page.side-panel .memory-lane-filter-chips {
  display: flex !important;
  width: 100% !important;
  min-width: 0 !important;
  flex-wrap: wrap !important;
  justify-content: flex-start !important;
  gap: 2px !important;
  padding: 0 !important;
  overflow: visible !important;
}
html body main.app-shell > section.map-stage.memories-focus > #memoryLanePage.memory-database-page.side-panel .memory-lane-filter-chip {
  flex: 0 1 auto !important;
  min-width: 44px !important;
  min-height: 44px !important;
  padding: 8px !important;
  border-radius: 11px !important;
  font-size: .75rem !important;
  line-height: 1.4 !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
}
html body main.app-shell > section.map-stage.memories-focus > #memoryLanePage.memory-database-page.side-panel .memory-lane-result-line {
  margin-top: 4px !important;
  padding-top: 6px !important;
  min-height: 44px !important;
  border-top-color: #d7e6e8 !important;
  font-size: .8125rem !important;
}
html body main.app-shell > section.map-stage.memories-focus > #memoryLanePage.memory-database-page.side-panel .memory-lane-sort {
  flex-wrap: wrap !important;
  font-size: .8125rem !important;
}
html body main.app-shell > section.map-stage.memories-focus > #memoryLanePage.memory-database-page.side-panel .memory-lane-sort select {
  min-height: 44px !important;
  height: auto !important;
  font-size: .8125rem !important;
}
html body main.app-shell > section.map-stage.memories-focus > #memoryLanePage.memory-database-page.side-panel .memory-lane-no-results button {
  min-height: 44px !important;
  height: auto !important;
  white-space: normal !important;
}

/* The first page is an invitation, not a full-screen promotion. Keep the
   mascot, one main action, a quieter import action, and a simple Home link. */
html body main.app-shell > section.map-stage.memories-focus > #memoryLanePage.memory-database-page.side-panel #memoryList:has(> .memory-lane-empty) {
  min-height: 0 !important;
  height: auto !important;
  align-content: start !important;
  overflow: visible !important;
}
html body main.app-shell > section.map-stage.memories-focus > #memoryLanePage.memory-database-page.side-panel #memoryList > .memory-lane-empty {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-auto-rows: max-content !important;
  align-content: start !important;
  align-items: center !important;
  width: min(100%, 720px) !important;
  min-height: 0 !important;
  height: auto !important;
  margin: 4px auto 0 !important;
  padding: 18px 18px 10px !important;
  gap: 10px !important;
  border: 1px solid #d6e4e5 !important;
  border-radius: 24px !important;
  background: #fbfefd !important;
  box-shadow: 0 8px 26px #00243f07 !important;
  text-align: center !important;
}
html body main.app-shell > section.map-stage.memories-focus > #memoryLanePage.memory-database-page.side-panel #memoryList .memory-lane-empty-art {
  justify-self: center !important;
  width: 80px !important;
  height: 80px !important;
  border: 1px solid #d2e9e4 !important;
  border-radius: 24px !important;
  background: #e7f5f1 !important;
  box-shadow: none !important;
}
html body main.app-shell > section.map-stage.memories-focus > #memoryLanePage.memory-database-page.side-panel #memoryList .memory-lane-empty-art img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
}
html body main.app-shell > section.map-stage.memories-focus > #memoryLanePage.memory-database-page.side-panel #memoryList .memory-lane-empty-copy {
  display: grid !important;
  grid-auto-rows: max-content !important;
  justify-items: center !important;
  align-content: start !important;
  min-width: 0 !important;
  gap: 7px !important;
  text-align: center !important;
}
html body main.app-shell > section.map-stage.memories-focus > #memoryLanePage.memory-database-page.side-panel #memoryList .memory-lane-empty-copy > span {
  font-size: .625rem !important;
  line-height: 1.4 !important;
  letter-spacing: .1em !important;
}
html body main.app-shell > section.map-stage.memories-focus > #memoryLanePage.memory-database-page.side-panel #memoryList .memory-lane-empty-copy > strong {
  font-size: 1.25rem !important;
  line-height: 1.25 !important;
  text-wrap: balance;
}
html body main.app-shell > section.map-stage.memories-focus > #memoryLanePage.memory-database-page.side-panel #memoryList .memory-lane-empty-copy > p {
  max-width: 34rem !important;
  margin: 0 !important;
  font-size: .875rem !important;
  font-weight: 500 !important;
  line-height: 1.5 !important;
  text-wrap: pretty;
  overflow-wrap: anywhere !important;
}
html body main.app-shell > section.map-stage.memories-focus > #memoryLanePage.memory-database-page.side-panel #memoryList .memory-lane-empty-actions {
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) !important;
  grid-auto-rows: max-content !important;
  align-content: start !important;
  width: min(100%, 440px) !important;
  height: auto !important;
  min-height: 0 !important;
  margin-top: 7px !important;
  gap: 6px 8px !important;
}
html body main.app-shell > section.map-stage.memories-focus > #memoryLanePage.memory-database-page.side-panel #memoryList .memory-lane-empty-actions > button {
  min-width: 0 !important;
  min-height: 44px !important;
  height: auto !important;
  align-self: stretch !important;
  padding: 10px 8px !important;
  gap: 6px !important;
  border-radius: 13px !important;
  font-size: .8125rem !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  box-shadow: none !important;
}
html body main.app-shell > section.map-stage.memories-focus > #memoryLanePage.memory-database-page.side-panel #memoryList .memory-lane-empty-actions > button :is(svg, [data-icon]) {
  flex: 0 0 16px !important;
  width: 16px !important;
  height: 16px !important;
}
html body main.app-shell > section.map-stage.memories-focus > #memoryLanePage.memory-database-page.side-panel #memoryList .memory-lane-empty-actions > .primary-button {
  grid-column: 1 / -1 !important;
  min-height: 48px !important;
  color: #fff !important;
  border: 1px solid #00243f !important;
  background: #00243f !important;
}
html body main.app-shell > section.map-stage.memories-focus > #memoryLanePage.memory-database-page.side-panel #memoryList .memory-lane-empty-actions > .secondary-button {
  grid-column: auto !important;
  color: #00243f !important;
  border: 1px solid #cfdee2 !important;
  background: #f8fcfb !important;
}
html body main.app-shell > section.map-stage.memories-focus > #memoryLanePage.memory-database-page.side-panel #memoryList .memory-lane-empty-actions > .memory-lane-empty-home {
  grid-column: auto !important;
  color: #526d7b !important;
  border: 1px solid transparent !important;
  background: transparent !important;
  text-decoration: underline !important;
  text-underline-offset: 3px !important;
}
html body main.app-shell > section.map-stage.memories-focus > #memoryLanePage.memory-database-page.side-panel #memoryList .memory-lane-empty-recovery {
  grid-column: 1 / -1 !important;
  min-width: 0 !important;
  padding-top: 0 !important;
  border-top: 1px solid #e1ebec !important;
}
html body main.app-shell > section.map-stage.memories-focus > #memoryLanePage.memory-database-page.side-panel #memoryList .memory-lane-empty-recovery > summary {
  box-sizing: border-box !important;
  min-height: 44px !important;
  padding: 12px 0 !important;
  color: #526d7b !important;
  font-size: .75rem !important;
  font-weight: 600 !important;
  line-height: 1.5 !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  text-align: center !important;
}

@media (min-width: 740px) {
  html body main.app-shell > section.map-stage.memories-focus > #memoryLanePage.memory-database-page.side-panel > .memory-lane-toolbar {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    gap: 20px !important;
  }
}
@media (orientation: landscape) and (max-height: 520px) {
  html body main.app-shell > section.map-stage.memories-focus > #memoryLanePage.memory-database-page.side-panel {
    --lane-entry-gutter: max(20px, env(safe-area-inset-left), env(safe-area-inset-right));
    bottom: var(--memory-lane-content-bottom, var(--landscape-dock-clearance, 84px)) !important;
    padding-block: 2px 14px !important;
  }
  html body main.app-shell > section.map-stage.memories-focus > #memoryLanePage.memory-database-page.side-panel > .memory-lane-toolbar {
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr) !important;
    gap: 12px !important;
    margin-bottom: 6px !important;
  }
  html body main.app-shell > section.map-stage.memories-focus > #memoryLanePage.memory-database-page.side-panel .memory-hub-title h2 {
    font-size: 1.25rem !important;
  }
  html body main.app-shell > section.map-stage.memories-focus > #memoryLanePage.memory-database-page.side-panel .memory-hub-title p {
    font-size: .75rem !important;
  }
  html body main.app-shell > section.map-stage.memories-focus > #memoryLanePage.memory-database-page.side-panel > .memory-lane-view-tabs {
    padding: 0 !important;
    margin-bottom: 6px !important;
  }
  html body main.app-shell > section.map-stage.memories-focus > #memoryLanePage.memory-database-page.side-panel > .memory-lane-browse {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 8px 16px !important;
    margin-bottom: 6px !important;
  }
  html body main.app-shell > section.map-stage.memories-focus > #memoryLanePage.memory-database-page.side-panel .memory-lane-result-line {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
  }
  html body main.app-shell > section.map-stage.memories-focus > #memoryLanePage.memory-database-page.side-panel #memoryList > .memory-lane-empty {
    grid-template-columns: 64px minmax(0, 1fr) !important;
    margin-top: 0 !important;
    padding: 10px 18px 8px !important;
    gap: 8px 16px !important;
    text-align: left !important;
  }
  html body main.app-shell > section.map-stage.memories-focus > #memoryLanePage.memory-database-page.side-panel #memoryList .memory-lane-empty-art {
    width: 64px !important;
    height: 64px !important;
    border-radius: 20px !important;
  }
  html body main.app-shell > section.map-stage.memories-focus > #memoryLanePage.memory-database-page.side-panel #memoryList .memory-lane-empty-copy {
    justify-items: start !important;
    gap: 5px !important;
    text-align: left !important;
  }
  html body main.app-shell > section.map-stage.memories-focus > #memoryLanePage.memory-database-page.side-panel #memoryList .memory-lane-empty-copy > span {
    display: none !important;
  }
  html body main.app-shell > section.map-stage.memories-focus > #memoryLanePage.memory-database-page.side-panel #memoryList .memory-lane-empty-actions {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) auto !important;
    width: 100% !important;
    margin-top: 5px !important;
  }
  html body main.app-shell > section.map-stage.memories-focus > #memoryLanePage.memory-database-page.side-panel #memoryList .memory-lane-empty-actions > .primary-button {
    grid-column: auto !important;
  }
}
@media (orientation: landscape) and (max-height: 520px) and (max-width: 640px) {
  html body main.app-shell > section.map-stage.memories-focus > #memoryLanePage.memory-database-page.side-panel > .memory-lane-browse {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 4px !important;
  }
  html body main.app-shell > section.map-stage.memories-focus > #memoryLanePage.memory-database-page.side-panel #memoryList .memory-lane-empty-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  html body main.app-shell > section.map-stage.memories-focus > #memoryLanePage.memory-database-page.side-panel #memoryList .memory-lane-empty-actions > .primary-button {
    grid-column: 1 / -1 !important;
  }
}
/* A populated landscape archive gives its photographs the first screen.
   Views and filters share a row; both still wrap naturally at larger text. */
@media (orientation: landscape) and (min-width: 740px) and (max-height: 520px) {
  html body main.app-shell > section.map-stage.memories-focus > #memoryLanePage.memory-database-page.side-panel:has(.memory-lane-overview) {
    display: grid !important;
    grid-template-columns: minmax(0, .48fr) minmax(0, .52fr) !important;
    grid-auto-rows: max-content !important;
    align-content: start !important;
    align-items: start !important;
    gap: 8px 14px !important;
  }
  html body main.app-shell > section.map-stage.memories-focus > #memoryLanePage.memory-database-page.side-panel:has(.memory-lane-overview) > :is(.memory-lane-toolbar, .drawer-view) {
    grid-column: 1 / -1 !important;
  }
  html body main.app-shell > section.map-stage.memories-focus > #memoryLanePage.memory-database-page.side-panel:has(.memory-lane-overview) > :is(.memory-lane-toolbar, .memory-lane-view-tabs, .memory-lane-browse) {
    margin-block: 0 !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  html body main.app-shell > section.map-stage.memories-focus > #memoryLanePage.memory-database-page.side-panel {
    scroll-behavior: auto !important;
  }
}

/* Memory Lane is a full app tab, not the cinematic Explore surface.
   Remove only its legacy decorative vignette; preserve archive geometry,
   navy chrome, account-panel shadows and real dialog backdrops. */
html body main.app-shell > section.map-stage.memories-focus::after {
  display: none !important;
}
