/*
 * Memory Lane premium visual layer.
 * Load after memory-lane.css and the legacy application styles.
 */

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel {
  --memory-lane-ink: #0a3440;
  --memory-lane-muted: #62777c;
  --memory-lane-line: rgba(9, 69, 72, 0.11);
  --memory-lane-surface: rgba(255, 255, 252, 0.94);
  --memory-lane-surface-solid: #fffefb;
  --memory-lane-teal: #0c756f;
  --memory-lane-deep: #084857;
  --memory-lane-green: #18a978;
  --memory-lane-coral: #f2645a;
  --memory-lane-shadow: 0 18px 44px rgba(8, 53, 59, 0.09);
  width: 100% !important;
  max-width: 100% !important;
  padding: clamp(92px, 9vw, 112px) clamp(18px, 4vw, 48px) 132px !important;
  overflow-x: hidden !important;
  overscroll-behavior-y: contain !important;
  color: var(--memory-lane-ink) !important;
  background:
    radial-gradient(circle at 8% 0%, rgba(140, 216, 197, 0.18), transparent 27rem),
    radial-gradient(circle at 94% 14%, rgba(127, 190, 216, 0.14), transparent 26rem),
    linear-gradient(180deg, #edf7f3 0%, #fafcf9 43%, #edf5f7 100%) !important;
  scrollbar-gutter: stable !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel,
html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel *,
html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel *::before,
html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel *::after {
  box-sizing: border-box;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel > *,
html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList,
html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-journal-list {
  min-width: 0 !important;
  max-width: 100% !important;
}

/* Header and search */
html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel > .panel-section.memory-lane-toolbar {
  position: relative !important;
  z-index: 24 !important;
  display: grid !important;
  gap: 16px !important;
  width: min(100%, 1280px) !important;
  margin: 0 auto 16px !important;
  padding: 0 0 18px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--memory-lane-line) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-hub-heading {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: end !important;
  gap: 20px !important;
  margin: 0 !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-hub-title {
  display: grid !important;
  gap: 4px !important;
  min-width: 0 !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-hub-kicker {
  color: var(--memory-lane-teal) !important;
  font-size: 0.66rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-hub-heading h2 {
  margin: 0 !important;
  color: var(--memory-lane-ink) !important;
  font-size: clamp(2rem, 4vw, 3rem) !important;
  font-weight: 900 !important;
  line-height: 0.98 !important;
  letter-spacing: -0.035em !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-hub-heading p {
  max-width: 640px !important;
  margin: 2px 0 0 !important;
  overflow: hidden !important;
  color: var(--memory-lane-muted) !important;
  font-size: 0.9rem !important;
  line-height: 1.45 !important;
  text-overflow: ellipsis !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-hub-actions {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-hub-actions #memoryCount,
html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-hub-actions #closeMemoriesButton {
  min-width: 44px !important;
  height: 44px !important;
  border: 1px solid var(--memory-lane-line) !important;
  border-radius: 999px !important;
  color: var(--memory-lane-deep) !important;
  background: rgba(255, 255, 252, 0.78) !important;
  box-shadow: 0 8px 20px rgba(8, 53, 59, 0.06) !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .search-wrap.memory-lane-search {
  display: grid !important;
  grid-template-columns: 20px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 10px !important;
  width: 100% !important;
  min-height: 52px !important;
  margin: 0 !important;
  padding: 0 16px !important;
  border: 1px solid var(--memory-lane-line) !important;
  border-radius: 15px !important;
  color: var(--memory-lane-teal) !important;
  background: rgba(255, 255, 252, 0.88) !important;
  box-shadow: 0 10px 28px rgba(8, 53, 59, 0.055) !important;
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .search-wrap.memory-lane-search:focus-within {
  border-color: rgba(12, 117, 111, 0.38) !important;
  background: var(--memory-lane-surface-solid) !important;
  box-shadow: 0 0 0 4px rgba(24, 169, 120, 0.1), 0 12px 30px rgba(8, 53, 59, 0.08) !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .search-wrap.memory-lane-search input {
  width: 100% !important;
  min-width: 0 !important;
  height: 50px !important;
  padding: 0 !important;
  border: 0 !important;
  outline: 0 !important;
  color: var(--memory-lane-ink) !important;
  background: transparent !important;
  font-size: 0.94rem !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .search-wrap.memory-lane-search input::placeholder {
  color: rgba(35, 73, 80, 0.5) !important;
  opacity: 1 !important;
}

/* Persistent archive views stay available after leaving the card grid. */
html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel > .tabs.memory-lane-view-tabs {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 4px !important;
  width: min(100%, 1280px) !important;
  margin: 0 auto 14px !important;
  padding: 4px !important;
  overflow: hidden !important;
  border: 1px solid var(--memory-lane-line) !important;
  border-radius: 15px !important;
  background: rgba(255, 255, 252, 0.72) !important;
  box-shadow: 0 8px 22px rgba(8, 53, 59, 0.045) !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel > .tabs.memory-lane-view-tabs .tab {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 0 !important;
  min-height: 42px !important;
  padding: 0 12px !important;
  overflow: hidden !important;
  border: 0 !important;
  border-radius: 11px !important;
  color: #496a70 !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 0.75rem !important;
  font-weight: 820 !important;
  line-height: 1 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel > .tabs.memory-lane-view-tabs .tab.active {
  color: #ffffff !important;
  background: linear-gradient(135deg, #075667, #0b817c 64%, #15966f) !important;
  box-shadow: 0 7px 16px rgba(9, 105, 100, 0.14) !important;
}

/* Discovery controls: filters, sort, result count, and Browse menu. */
html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-discovery-row {
  position: relative !important;
  z-index: 18 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto auto !important;
  align-items: center !important;
  gap: 10px !important;
  width: min(100%, 1280px) !important;
  min-width: 0 !important;
  margin: 0 auto !important;
  padding: 2px 0 !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-filter-chips {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  min-width: 0 !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scrollbar-width: none !important;
  overscroll-behavior-inline: contain !important;
  -webkit-overflow-scrolling: touch !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-filter-chips::-webkit-scrollbar {
  display: none !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-filter-chip {
  flex: 0 0 auto !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  min-height: 44px !important;
  padding: 0 15px !important;
  border: 1px solid var(--memory-lane-line) !important;
  border-radius: 999px !important;
  color: #315b62 !important;
  background: rgba(255, 255, 252, 0.7) !important;
  box-shadow: none !important;
  font-size: 0.76rem !important;
  font-weight: 820 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  touch-action: manipulation !important;
  transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease, transform 150ms ease !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-filter-chip:hover {
  border-color: rgba(12, 117, 111, 0.24) !important;
  color: var(--memory-lane-deep) !important;
  background: #ffffff !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-filter-chip.is-active,
html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-filter-chip[aria-pressed="true"] {
  border-color: transparent !important;
  color: #ffffff !important;
  background: linear-gradient(135deg, #075667, #0b817c 64%, #15966f) !important;
  box-shadow: 0 8px 18px rgba(9, 105, 100, 0.16) !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-sort-select,
html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-browse-control > summary,
html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-browse-control > button {
  min-height: 44px !important;
  border: 1px solid var(--memory-lane-line) !important;
  border-radius: 13px !important;
  color: #25535c !important;
  background: rgba(255, 255, 252, 0.82) !important;
  box-shadow: none !important;
  font-size: 0.76rem !important;
  font-weight: 820 !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel select.memory-lane-sort-select {
  max-width: 180px !important;
  padding: 0 34px 0 13px !important;
  cursor: pointer !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-browse-control {
  position: relative !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-browse-control > summary,
html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-browse-control > button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  padding: 0 14px !important;
  cursor: pointer !important;
  list-style: none !important;
  white-space: nowrap !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-browse-control > summary::-webkit-details-marker {
  display: none !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-results-meta {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  min-width: 0 !important;
  color: var(--memory-lane-muted) !important;
  font-size: 0.72rem !important;
  font-weight: 720 !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-discovery-row > .memory-lane-results-meta {
  grid-column: 1 / -1 !important;
}

/* Compact collection snapshot. */
html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-snapshot {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 14px !important;
  width: min(100%, 1280px) !important;
  min-width: 0 !important;
  margin: 0 auto !important;
  padding: 14px 16px !important;
  border: 1px solid var(--memory-lane-line) !important;
  border-radius: 16px !important;
  color: var(--memory-lane-ink) !important;
  background: rgba(255, 255, 252, 0.74) !important;
  box-shadow: 0 10px 28px rgba(8, 53, 59, 0.055) !important;
  backdrop-filter: blur(16px) !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-snapshot-primary {
  display: flex !important;
  align-items: baseline !important;
  flex-wrap: wrap !important;
  gap: 5px 9px !important;
  min-width: 0 !important;
  color: var(--memory-lane-ink) !important;
  font-size: 0.88rem !important;
  font-weight: 850 !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-snapshot-primary strong {
  color: var(--memory-lane-deep) !important;
  font-size: 1.08rem !important;
  font-weight: 900 !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-snapshot-secondary {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 7px !important;
  min-width: 0 !important;
  color: var(--memory-lane-muted) !important;
  font-size: 0.72rem !important;
  font-weight: 750 !important;
  text-align: right !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-snapshot-secondary::before {
  width: 7px !important;
  height: 7px !important;
  flex: 0 0 7px !important;
  border-radius: 50% !important;
  background: #42be8b !important;
  box-shadow: 0 0 0 4px rgba(66, 190, 139, 0.1) !important;
  content: "" !important;
}

/* Upgrade the current overview until it is replaced by the compact snapshot. */
html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList .memory-lane-overview {
  display: grid !important;
  gap: 12px !important;
  width: 100% !important;
  padding: 16px 18px !important;
  border: 1px solid var(--memory-lane-line) !important;
  border-radius: 17px !important;
  color: var(--memory-lane-ink) !important;
  background: rgba(255, 255, 252, 0.83) !important;
  box-shadow: var(--memory-lane-shadow) !important;
  backdrop-filter: blur(18px) !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList .memory-lane-overview-top {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 14px !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList .memory-lane-overview-copy {
  display: grid !important;
  gap: 3px !important;
  min-width: 0 !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList .memory-lane-overview-copy > span {
  color: var(--memory-lane-teal) !important;
  font-size: 0.61rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList .memory-lane-overview-copy strong {
  color: var(--memory-lane-ink) !important;
  font-size: clamp(1.03rem, 2vw, 1.35rem) !important;
  font-weight: 900 !important;
  line-height: 1.14 !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList .memory-lane-overview-copy p {
  margin: 0 !important;
  color: var(--memory-lane-muted) !important;
  font-size: 0.76rem !important;
  line-height: 1.4 !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList .memory-lane-create-button {
  min-height: 44px !important;
  padding: 0 14px !important;
  border: 0 !important;
  border-radius: 13px !important;
  color: #ffffff !important;
  background: linear-gradient(135deg, var(--memory-lane-deep), var(--memory-lane-teal)) !important;
  box-shadow: 0 9px 20px rgba(8, 84, 90, 0.15) !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList .memory-lane-overview-stats .memory-lane-stats {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 0 !important;
  width: 100% !important;
  border-top: 1px solid var(--memory-lane-line) !important;
  border-bottom: 1px solid var(--memory-lane-line) !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList .memory-lane-overview-stats .memory-lane-stat {
  display: flex !important;
  align-items: baseline !important;
  justify-content: center !important;
  gap: 5px !important;
  min-height: 48px !important;
  padding: 10px 8px !important;
  border: 0 !important;
  border-right: 1px solid var(--memory-lane-line) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList .memory-lane-overview-stats .memory-lane-stat:last-child {
  border-right: 0 !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList .memory-lane-overview-stats .memory-lane-stat strong {
  color: var(--memory-lane-deep) !important;
  font-size: 1rem !important;
  font-weight: 900 !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList .memory-lane-overview-stats .memory-lane-stat span {
  color: var(--memory-lane-muted) !important;
  font-size: 0.68rem !important;
  font-weight: 760 !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList .memory-lane-overview-footer {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList .memory-lane-archive-status {
  color: var(--memory-lane-muted) !important;
  font-size: 0.7rem !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList .memory-lane-archive-status i {
  background: #42be8b !important;
  box-shadow: 0 0 0 4px rgba(66, 190, 139, 0.1) !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList .memory-lane-tools summary {
  color: var(--memory-lane-muted) !important;
  font-size: 0.7rem !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList .memory-lane-tools {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList .memory-lane-tools:not([open]) > .memory-lane-tools-panel {
  display: none !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList .memory-lane-no-results {
  display: grid !important;
  justify-items: center !important;
  gap: 9px !important;
  width: min(100%, 640px) !important;
  margin: 8px auto 0 !important;
  padding: clamp(24px, 5vw, 42px) !important;
  border: 1px solid var(--memory-lane-line) !important;
  border-radius: 18px !important;
  color: var(--memory-lane-ink) !important;
  background: rgba(255, 255, 252, 0.9) !important;
  box-shadow: var(--memory-lane-shadow) !important;
  text-align: center !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList .memory-lane-no-results > svg {
  width: 28px !important;
  height: 28px !important;
  color: var(--memory-lane-teal) !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList .memory-lane-no-results > strong {
  font-size: 1.12rem !important;
  line-height: 1.2 !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList .memory-lane-no-results > p {
  max-width: 480px !important;
  margin: 0 0 4px !important;
  color: var(--memory-lane-muted) !important;
  font-size: 0.82rem !important;
  line-height: 1.45 !important;
}

/* Card grid: two columns on compact desktops and three on wide desktops. */
html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList {
  display: grid !important;
  gap: 14px !important;
  width: min(100%, 1280px) !important;
  margin: 0 auto !important;
  padding: 0 !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList .pin-database-list.memory-journal-list {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  align-items: stretch !important;
  gap: 18px !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

@media (min-width: 1180px) {
  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList .pin-database-list.memory-journal-list {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

/* Photo-first memory cards. */
html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 100% !important;
  overflow: visible !important;
  border: 1px solid var(--memory-lane-line) !important;
  border-radius: 19px !important;
  color: var(--memory-lane-ink) !important;
  background: var(--memory-lane-surface-solid) !important;
  box-shadow: 0 14px 34px rgba(7, 50, 56, 0.085) !important;
  cursor: pointer !important;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card:hover {
  transform: translateY(-3px) !important;
  border-color: color-mix(in srgb, var(--memory-accent, var(--memory-lane-green)) 30%, var(--memory-lane-line)) !important;
  box-shadow: 0 20px 44px rgba(7, 50, 56, 0.12) !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card .memory-lane-flashcard-main {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: auto auto auto !important;
  grid-template-areas:
    "cover"
    "copy"
    "actions" !important;
  align-content: start !important;
  gap: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border-radius: inherit !important;
  background: var(--memory-lane-surface-solid) !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card .memory-lane-cover {
  grid-area: cover !important;
  position: relative !important;
  width: 100% !important;
  height: auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  aspect-ratio: 16 / 10 !important;
  overflow: hidden !important;
  border: 0 !important;
  border-radius: 18px 18px 0 0 !important;
  background: linear-gradient(145deg, #0a4e5b, #199471) !important;
  box-shadow: none !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card .memory-lane-cover-image,
html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card .memory-lane-cover-empty {
  position: absolute !important;
  inset: 0 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  object-fit: cover !important;
  object-position: var(--home-photo-position, center 32%) !important;
  border-radius: inherit !important;
  opacity: 1 !important;
  visibility: visible !important;
  transition: transform 300ms ease !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card:hover .memory-lane-cover-image {
  transform: scale(1.018) !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card .memory-lane-cover-empty {
  display: grid !important;
  place-items: center !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card .memory-lane-cover-empty span {
  font-size: clamp(2rem, 5vw, 3rem) !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card .memory-lane-cover-empty strong {
  display: none !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card .memory-lane-cover-meta {
  position: absolute !important;
  right: 10px !important;
  bottom: 10px !important;
  z-index: 3 !important;
  max-width: calc(100% - 20px) !important;
  padding: 6px 9px !important;
  overflow: hidden !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: 999px !important;
  color: #ffffff !important;
  background: rgba(4, 34, 42, 0.64) !important;
  box-shadow: 0 5px 15px rgba(2, 27, 33, 0.12) !important;
  font-size: 0.62rem !important;
  font-weight: 820 !important;
  line-height: 1 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  backdrop-filter: blur(9px) !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card .memory-lane-flashcard-copy {
  grid-area: copy !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  align-content: initial !important;
  gap: 5px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 14px 15px 10px !important;
  text-align: left !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card .memory-lane-flashcard-copy > strong {
  order: 1 !important;
  display: -webkit-box !important;
  width: 100% !important;
  overflow: hidden !important;
  color: var(--memory-lane-ink) !important;
  font-size: 1.05rem !important;
  font-weight: 900 !important;
  line-height: 1.2 !important;
  letter-spacing: -0.012em !important;
  white-space: normal !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 2 !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card .memory-lane-flashcard-copy > small {
  order: 2 !important;
  display: -webkit-box !important;
  width: 100% !important;
  overflow: hidden !important;
  color: var(--memory-lane-muted) !important;
  font-size: 0.75rem !important;
  font-weight: 680 !important;
  line-height: 1.4 !important;
  white-space: normal !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 2 !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card .memory-lane-feeling {
  order: 3 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  width: fit-content !important;
  min-height: 0 !important;
  margin: 2px 0 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  color: #526d72 !important;
  background: transparent !important;
  font-size: 0.67rem !important;
  font-weight: 830 !important;
  letter-spacing: 0.025em !important;
  text-transform: none !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card .memory-lane-feeling i {
  width: 7px !important;
  height: 7px !important;
  flex: 0 0 7px !important;
  border-radius: 50% !important;
  background: var(--mood-color, var(--memory-accent, var(--memory-lane-green))) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--mood-color, var(--memory-accent, var(--memory-lane-green))) 14%, transparent) !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card .memory-lane-note-preview {
  order: 4 !important;
  display: -webkit-box !important;
  width: 100% !important;
  margin: 3px 0 0 !important;
  overflow: hidden !important;
  color: #63767a !important;
  font-size: 0.73rem !important;
  font-style: normal !important;
  font-weight: 560 !important;
  line-height: 1.45 !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 2 !important;
}

/* Healthy sync labels stay quiet; only actionable warnings remain visible. */
html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card .memory-lane-saved-label {
  order: 5 !important;
  display: none !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card .memory-lane-saved-label.needs-backup,
html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card .memory-lane-card-warning {
  order: 5 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  width: fit-content !important;
  max-width: 100% !important;
  margin: 3px 0 0 !important;
  padding: 6px 8px !important;
  border: 1px solid rgba(205, 112, 66, 0.16) !important;
  border-radius: 9px !important;
  color: #9a552f !important;
  background: #fff8ef !important;
  font-size: 0.66rem !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
}

/* One primary action plus a compact overflow menu. */
html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card .memory-lane-action-dock {
  grid-area: actions !important;
  align-self: end !important;
  width: 100% !important;
  padding: 0 14px 14px !important;
  border: 0 !important;
  background: transparent !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card .memory-card-actions {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  grid-template-areas:
    "warning warning"
    "relive menu" !important;
  align-items: center !important;
  gap: 8px !important;
  width: 100% !important;
  min-width: 0 !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card .relive-memory-action {
  grid-area: relive !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 46px !important;
  padding: 0 15px !important;
  border: 0 !important;
  border-radius: 13px !important;
  color: #ffffff !important;
  background: linear-gradient(135deg, #075467, #0b7f7e 56%, #16976e) !important;
  box-shadow: 0 9px 20px rgba(9, 105, 100, 0.16) !important;
  font-size: 0.76rem !important;
  font-weight: 850 !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card .relive-memory-action small {
  display: none !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card .memory-card-actions > .memory-card-action.needs-location,
html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card .memory-card-actions > .memory-lane-card-warning {
  grid-area: warning !important;
  justify-self: start !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card .memory-card-actions > .memory-card-action.needs-location {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 6px !important;
  width: fit-content !important;
  min-height: 0 !important;
  padding: 6px 8px !important;
  border: 1px solid rgba(205, 112, 66, 0.16) !important;
  border-radius: 9px !important;
  color: #9a552f !important;
  background: #fff8ef !important;
  box-shadow: none !important;
  font-size: 0.66rem !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card .memory-card-actions > .edit-memory-action,
html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card .memory-card-actions > .delete-memory-action {
  display: none !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card .memory-lane-card-menu {
  grid-area: menu !important;
  position: relative !important;
  display: block !important;
  width: 46px !important;
  min-width: 46px !important;
  height: 46px !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card .memory-lane-card-menu-trigger {
  display: inline-grid !important;
  place-items: center !important;
  width: 46px !important;
  min-width: 46px !important;
  height: 46px !important;
  min-height: 46px !important;
  padding: 0 !important;
  border: 1px solid var(--memory-lane-line) !important;
  border-radius: 13px !important;
  color: #325d64 !important;
  background: #f4f8f6 !important;
  box-shadow: none !important;
  cursor: pointer !important;
  touch-action: manipulation !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card .memory-lane-card-menu-trigger svg {
  width: 18px !important;
  height: 18px !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card .memory-lane-card-menu-panel {
  position: absolute !important;
  right: 0 !important;
  bottom: calc(100% + 8px) !important;
  z-index: 90 !important;
  display: none !important;
  gap: 4px !important;
  width: min(190px, calc(100vw - 40px)) !important;
  padding: 7px !important;
  border: 1px solid var(--memory-lane-line) !important;
  border-radius: 14px !important;
  color: var(--memory-lane-ink) !important;
  background: rgba(255, 255, 252, 0.98) !important;
  box-shadow: 0 18px 40px rgba(5, 40, 47, 0.2) !important;
  backdrop-filter: blur(18px) !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card .memory-lane-card-menu.is-open .memory-lane-card-menu-panel,
html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card details.memory-lane-card-menu[open] .memory-lane-card-menu-panel,
html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card .memory-lane-card-menu-trigger[aria-expanded="true"] + .memory-lane-card-menu-panel {
  display: grid !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card .memory-lane-card-menu-panel .memory-card-action {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 9px !important;
  width: 100% !important;
  min-height: 40px !important;
  padding: 0 10px !important;
  border: 0 !important;
  border-radius: 9px !important;
  color: #28565e !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 0.75rem !important;
  font-weight: 800 !important;
  text-align: left !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card .memory-lane-card-menu-panel .memory-card-action:hover {
  background: #f0f7f4 !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card .memory-lane-card-menu-panel .delete-memory-action {
  color: #a1474f !important;
}

/* Final application markup aliases. */
html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-controls {
  position: relative !important;
  z-index: 18 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 10px !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 2px 0 !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-sort,
html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-browse {
  position: relative !important;
  display: block !important;
  min-width: 0 !important;
  margin: 0 !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-sort > span,
html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-browse > span {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-sort > select,
html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-browse > select {
  display: block !important;
  width: 100% !important;
  min-height: 44px !important;
  margin: 0 !important;
  padding: 0 34px 0 12px !important;
  overflow: hidden !important;
  border: 1px solid var(--memory-lane-line) !important;
  border-radius: 13px !important;
  color: #25535c !important;
  background-color: rgba(255, 255, 252, 0.82) !important;
  box-shadow: none !important;
  font-size: 0.74rem !important;
  font-weight: 820 !important;
  line-height: 1 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  cursor: pointer !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-sort {
  width: 154px !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-browse {
  width: 116px !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card .memory-lane-cover-badges {
  position: absolute !important;
  top: 10px !important;
  right: 10px !important;
  z-index: 4 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 7px !important;
  max-width: calc(100% - 20px) !important;
  pointer-events: none !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card .memory-lane-cover-badges:empty {
  display: none !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card .memory-lane-favorite-badge,
html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card .memory-lane-photo-count {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  min-height: 30px !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  color: #ffffff !important;
  background: rgba(4, 34, 42, 0.64) !important;
  box-shadow: 0 6px 16px rgba(2, 27, 33, 0.14) !important;
  font-size: 0.65rem !important;
  font-weight: 850 !important;
  line-height: 1 !important;
  backdrop-filter: blur(9px) !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card .memory-lane-favorite-badge {
  width: 30px !important;
  min-width: 30px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  color: #ffffff !important;
  background: rgba(226, 77, 75, 0.84) !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card .memory-lane-photo-count {
  padding: 0 9px !important;
  border-radius: 999px !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card .memory-lane-favorite-badge svg,
html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card .memory-lane-photo-count svg {
  width: 13px !important;
  height: 13px !important;
  stroke-width: 2.2 !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card .memory-lane-favorite-badge svg {
  fill: currentColor !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card .memory-lane-card-title {
  order: 1 !important;
  width: 100% !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card .memory-lane-card-meta {
  order: 2 !important;
  width: 100% !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card .memory-lane-card-menu > summary {
  display: inline-grid !important;
  place-items: center !important;
  width: 46px !important;
  min-width: 46px !important;
  height: 46px !important;
  min-height: 46px !important;
  padding: 0 !important;
  border: 1px solid var(--memory-lane-line) !important;
  border-radius: 13px !important;
  color: #325d64 !important;
  background: #f4f8f6 !important;
  box-shadow: none !important;
  cursor: pointer !important;
  list-style: none !important;
  touch-action: manipulation !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card .memory-lane-card-menu > summary::-webkit-details-marker {
  display: none !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card .memory-lane-card-menu > summary svg {
  width: 18px !important;
  height: 18px !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card .memory-lane-card-menu-panel > .edit-memory-action,
html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card .memory-lane-card-menu-panel > .delete-memory-action {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 9px !important;
  width: 100% !important;
  min-height: 40px !important;
  padding: 0 10px !important;
  border: 0 !important;
  border-radius: 9px !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 0.75rem !important;
  font-weight: 800 !important;
  text-align: left !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card .memory-lane-card-menu-panel > .edit-memory-action {
  color: #28565e !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card .memory-lane-card-menu-panel > .delete-memory-action {
  color: #a1474f !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card .memory-lane-card-menu-panel > .edit-memory-action:hover,
html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card .memory-lane-card-menu-panel > .delete-memory-action:hover {
  background: #f0f7f4 !important;
}

/* Keyboard focus is visible on every interactive layer. */
html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel :where(button, input, select, summary, [tabindex]):focus-visible {
  outline: 3px solid rgba(24, 169, 120, 0.32) !important;
  outline-offset: 3px !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card[tabindex]:focus-visible,
html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card:focus-within {
  border-color: rgba(12, 117, 111, 0.38) !important;
}

/* Mobile: compact, sticky discovery controls and a card near the first fold. */
@media (max-width: 760px) {
  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel {
    padding: calc(env(safe-area-inset-top) + 70px) 12px calc(106px + env(safe-area-inset-bottom)) !important;
    overflow-x: hidden !important;
    scrollbar-gutter: auto !important;
  }

  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel::before {
    content: "" !important;
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    left: 0 !important;
    z-index: 29 !important;
    height: 70px !important;
    pointer-events: none !important;
    background: linear-gradient(180deg, #e8f4f1 0%, #edf7f3 100%) !important;
  }

  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel > .panel-section.memory-lane-toolbar {
    position: sticky !important;
    top: 0 !important;
    z-index: 30 !important;
    gap: 8px !important;
    width: 100% !important;
    margin: 0 auto 10px !important;
    padding: 8px 2px 10px !important;
    border-bottom-color: rgba(9, 69, 72, 0.09) !important;
    background: linear-gradient(180deg, rgba(238, 247, 243, 0.98), rgba(246, 250, 247, 0.94)) !important;
    box-shadow: 0 8px 18px rgba(8, 53, 59, 0.035) !important;
    backdrop-filter: blur(18px) !important;
  }

  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-hub-heading {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 0 !important;
    min-height: 38px !important;
  }

  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-hub-title {
    gap: 1px !important;
  }

  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-hub-kicker {
    display: none !important;
  }

  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-hub-heading h2 {
    font-size: 1.55rem !important;
    line-height: 1 !important;
    letter-spacing: -0.028em !important;
  }

  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-hub-heading p {
    display: block !important;
    max-width: 100% !important;
    margin: 2px 0 0 !important;
    overflow: hidden !important;
    font-size: 0.7rem !important;
    line-height: 1.2 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-hub-actions,
  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-hub-actions #memoryCount,
  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-hub-actions #closeMemoriesButton {
    display: none !important;
  }

  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .search-wrap.memory-lane-search {
    min-height: 48px !important;
    padding: 0 14px !important;
    border-radius: 14px !important;
  }

  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .search-wrap.memory-lane-search input {
    height: 46px !important;
    font-size: 16px !important;
  }

  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel > .tabs.memory-lane-view-tabs {
    gap: 3px !important;
    width: 100% !important;
    margin: 0 auto 10px !important;
    padding: 3px !important;
    border-radius: 13px !important;
  }

  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel > .tabs.memory-lane-view-tabs .tab {
    min-height: 39px !important;
    padding: 0 4px !important;
    border-radius: 10px !important;
    font-size: 0.66rem !important;
    letter-spacing: -0.01em !important;
  }

  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-discovery-row {
    position: sticky !important;
    top: calc(env(safe-area-inset-top) + 158px) !important;
    z-index: 22 !important;
    grid-template-columns: minmax(0, 1fr) auto auto !important;
    gap: 7px !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 6px 0 8px !important;
    background: linear-gradient(180deg, rgba(247, 251, 248, 0.98), rgba(247, 251, 248, 0.92)) !important;
    backdrop-filter: blur(18px) !important;
  }

  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-filter-chips {
    gap: 7px !important;
    padding-right: 2px !important;
  }

  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-filter-chip {
    min-height: 48px !important;
    padding: 0 14px !important;
    font-size: 0.72rem !important;
  }

  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-sort-select,
  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-browse-control,
  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-browse-control > summary,
  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-browse-control > button {
    min-height: 48px !important;
  }

  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel select.memory-lane-sort-select {
    width: 96px !important;
    max-width: 96px !important;
    padding-right: 28px !important;
    padding-left: 10px !important;
    font-size: 0.7rem !important;
  }

  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-browse-control > summary,
  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-browse-control > button {
    width: 80px !important;
    min-width: 80px !important;
    padding: 0 9px !important;
  }

  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-results-meta {
    font-size: 0.68rem !important;
  }

  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-snapshot {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 6px !important;
    width: 100% !important;
    padding: 11px 13px !important;
    border-radius: 14px !important;
    box-shadow: 0 8px 22px rgba(8, 53, 59, 0.05) !important;
  }

  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-snapshot-primary {
    gap: 4px 7px !important;
    font-size: 0.78rem !important;
  }

  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-snapshot-primary strong {
    font-size: 0.94rem !important;
  }

  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-snapshot-secondary {
    justify-content: flex-start !important;
    font-size: 0.66rem !important;
    text-align: left !important;
  }

  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList {
    gap: 10px !important;
    width: 100% !important;
  }

  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList .memory-lane-no-results {
    margin-top: 2px !important;
    padding: 24px 18px !important;
    border-radius: 16px !important;
  }

  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList .memory-lane-overview {
    gap: 9px !important;
    padding: 12px !important;
    border-radius: 14px !important;
    box-shadow: 0 9px 24px rgba(8, 53, 59, 0.055) !important;
  }

  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList .memory-lane-overview-top {
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 8px !important;
  }

  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList .memory-lane-overview-copy > span,
  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList .memory-lane-overview-copy p {
    display: none !important;
  }

  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList .memory-lane-overview-copy strong {
    font-size: 0.92rem !important;
    line-height: 1.2 !important;
  }

  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList .memory-lane-create-button {
    width: 48px !important;
    min-width: 48px !important;
    height: 48px !important;
    min-height: 48px !important;
    padding: 0 !important;
  }

  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList .memory-lane-create-button > span:last-child {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
  }

  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList .memory-lane-overview-stats .memory-lane-stat {
    min-height: 40px !important;
    padding: 8px 4px !important;
  }

  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList .memory-lane-overview-stats .memory-lane-stat strong {
    font-size: 0.88rem !important;
  }

  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList .memory-lane-overview-stats .memory-lane-stat span {
    font-size: 0.62rem !important;
  }

  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList .memory-lane-overview-footer {
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    min-width: 0 !important;
  }

  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList .memory-lane-archive-status {
    min-width: 0 !important;
    overflow: hidden !important;
    font-size: 0.64rem !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList .memory-lane-tools summary {
    white-space: nowrap !important;
  }

  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList .pin-database-list.memory-journal-list {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 14px !important;
  }

  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card {
    height: auto !important;
    border-radius: 18px !important;
  }

  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card:hover {
    transform: none !important;
  }

  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card .memory-lane-cover {
    width: 100% !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: none !important;
    max-height: none !important;
    aspect-ratio: 16 / 10 !important;
    align-self: stretch !important;
    border-radius: 17px 17px 0 0 !important;
  }

  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card .memory-lane-flashcard-copy {
    gap: 4px !important;
    padding: 12px 13px 9px !important;
  }

  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card .memory-lane-flashcard-copy > strong {
    font-size: 1rem !important;
  }

  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card .memory-lane-note-preview {
    -webkit-line-clamp: 1 !important;
  }

  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card .memory-lane-action-dock {
    padding: 0 13px 13px !important;
  }

  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card .relive-memory-action,
  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card .memory-lane-card-menu,
  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card .memory-lane-card-menu-trigger {
    min-height: 48px !important;
    height: 48px !important;
  }

  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card .memory-lane-card-menu,
  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card .memory-lane-card-menu-trigger {
    width: 48px !important;
    min-width: 48px !important;
  }

  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList .memory-lane-tools-panel {
    position: static !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-controls {
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 7px !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    padding: 0 !important;
  }

  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-sort {
    width: 124px !important;
    min-width: 0 !important;
  }

  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-browse {
    width: 82px !important;
    min-width: 0 !important;
  }

  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-sort > select,
  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-browse > select {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 48px !important;
    padding-right: 24px !important;
    padding-left: 8px !important;
    font-size: 0.68rem !important;
  }

  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card .memory-lane-cover-badges {
    top: 8px !important;
    right: 8px !important;
    gap: 6px !important;
    max-width: calc(100% - 16px) !important;
  }

  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card .memory-lane-favorite-badge,
  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card .memory-lane-photo-count {
    min-height: 29px !important;
  }

  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card .memory-lane-favorite-badge {
    width: 29px !important;
    min-width: 29px !important;
  }

  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card .memory-lane-photo-count {
    padding-inline: 8px !important;
  }

  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card .memory-lane-card-menu > summary {
    width: 48px !important;
    min-width: 48px !important;
    height: 48px !important;
    min-height: 48px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel *,
  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel *::before,
  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card:hover,
  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card:hover .memory-lane-cover-image {
    transform: none !important;
  }
}

/* v6: useful archive views, persistent search, and dependable Relive actions. */
@media (min-width: 761px) {
  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel > .panel-section.memory-lane-toolbar {
    position: sticky !important;
    top: 0 !important;
    z-index: 32 !important;
    padding: 12px 14px 14px !important;
    border: 1px solid rgba(9, 69, 72, 0.08) !important;
    border-radius: 18px !important;
    background: rgba(239, 248, 244, 0.94) !important;
    box-shadow: 0 12px 28px rgba(8, 53, 59, 0.06) !important;
    backdrop-filter: blur(20px) !important;
  }
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel > :is(#timelineView, #listsView, #statsView) {
  display: grid !important;
  gap: 16px !important;
  width: min(100%, 1280px) !important;
  margin: 0 auto !important;
  padding: 0 !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel > :is(#timelineView, #listsView, #statsView).hidden {
  display: none !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel > .drawer-view.hidden {
  display: none !important;
  visibility: hidden !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel > #memoryList.drawer-view.hidden {
  display: none !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-view-intro {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 13px !important;
  padding: 16px 18px !important;
  border: 1px solid var(--memory-lane-line) !important;
  border-radius: 18px !important;
  color: var(--memory-lane-ink) !important;
  background: rgba(255, 255, 252, 0.84) !important;
  box-shadow: 0 12px 30px rgba(7, 50, 56, 0.065) !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-view-icon {
  display: grid !important;
  place-items: center !important;
  width: 42px !important;
  height: 42px !important;
  border-radius: 13px !important;
  color: #ffffff !important;
  background: linear-gradient(145deg, #075667, #15966f) !important;
  box-shadow: 0 8px 18px rgba(9, 105, 100, 0.15) !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-view-icon svg {
  width: 19px !important;
  height: 19px !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-view-intro > div {
  display: grid !important;
  gap: 3px !important;
  min-width: 0 !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-view-intro strong {
  font-size: 1.05rem !important;
  font-weight: 900 !important;
  line-height: 1.15 !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-view-intro p {
  margin: 0 !important;
  color: var(--memory-lane-muted) !important;
  font-size: 0.76rem !important;
  line-height: 1.4 !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-view-intro > small {
  padding: 7px 10px !important;
  border-radius: 999px !important;
  color: var(--memory-lane-teal) !important;
  background: rgba(24, 169, 120, 0.09) !important;
  font-size: 0.68rem !important;
  font-weight: 850 !important;
  white-space: nowrap !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-year-group,
html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-story-collection,
html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-country-cloud,
html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-insight-feature {
  display: grid !important;
  gap: 12px !important;
  margin: 0 !important;
  padding: 16px !important;
  border: 1px solid var(--memory-lane-line) !important;
  border-radius: 18px !important;
  background: rgba(255, 255, 252, 0.82) !important;
  box-shadow: 0 12px 30px rgba(7, 50, 56, 0.06) !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-group-heading {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  min-width: 0 !important;
  margin: 0 !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-group-heading > span,
html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-group-heading h3 {
  margin: 0 !important;
  color: var(--memory-lane-ink) !important;
  font-size: 1rem !important;
  font-weight: 900 !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-group-heading small,
html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-group-heading > span:last-child {
  color: var(--memory-lane-muted) !important;
  font-size: 0.67rem !important;
  font-weight: 780 !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-story-collection .memory-lane-group-heading > div > small {
  display: block !important;
  margin-bottom: 2px !important;
  color: var(--memory-lane-teal) !important;
  font-size: 0.58rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.09em !important;
  text-transform: uppercase !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-compact-list {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-compact-card {
  display: grid !important;
  grid-template-columns: 72px minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 11px !important;
  min-width: 0 !important;
  min-height: 88px !important;
  margin: 0 !important;
  padding: 9px !important;
  border: 1px solid var(--memory-lane-line) !important;
  border-radius: 15px !important;
  color: var(--memory-lane-ink) !important;
  background: #fffefb !important;
  box-shadow: 0 8px 20px rgba(7, 50, 56, 0.055) !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-compact-art {
  display: grid !important;
  place-items: center !important;
  width: 72px !important;
  height: 68px !important;
  overflow: hidden !important;
  border-radius: 11px !important;
  background: linear-gradient(145deg, #0a5360, #15966f) !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-compact-art img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: var(--home-photo-position, center 32%) !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-compact-art .card-emoji {
  font-size: 1.6rem !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-compact-card .card-copy {
  display: grid !important;
  gap: 4px !important;
  min-width: 0 !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-compact-card .card-copy strong {
  overflow: hidden !important;
  font-size: 0.86rem !important;
  font-weight: 900 !important;
  line-height: 1.22 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-compact-card .card-copy small {
  display: -webkit-box !important;
  overflow: hidden !important;
  color: var(--memory-lane-muted) !important;
  font-size: 0.68rem !important;
  line-height: 1.35 !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 2 !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-compact-relive {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  min-width: 84px !important;
  min-height: 44px !important;
  padding: 0 12px !important;
  border: 0 !important;
  border-radius: 12px !important;
  color: #ffffff !important;
  background: linear-gradient(135deg, #075467, #0b7f7e 56%, #16976e) !important;
  box-shadow: 0 8px 18px rgba(9, 105, 100, 0.16) !important;
  font-size: 0.72rem !important;
  font-weight: 860 !important;
  cursor: pointer !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-insights-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-insights-grid .stat-card {
  display: grid !important;
  align-content: center !important;
  gap: 4px !important;
  min-height: 104px !important;
  padding: 15px !important;
  border: 1px solid var(--memory-lane-line) !important;
  border-radius: 16px !important;
  color: var(--memory-lane-ink) !important;
  background: rgba(255, 255, 252, 0.84) !important;
  box-shadow: 0 9px 24px rgba(7, 50, 56, 0.05) !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-insights-grid .stat-card strong {
  color: var(--memory-lane-deep) !important;
  font-size: 1.22rem !important;
  font-weight: 900 !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-insights-grid .stat-card span {
  color: var(--memory-lane-muted) !important;
  font-size: 0.7rem !important;
  font-weight: 760 !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-insight-feature {
  grid-template-columns: auto minmax(0, 1fr) !important;
  align-items: center !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-insight-feature > svg {
  width: 28px !important;
  height: 28px !important;
  color: var(--memory-lane-teal) !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-insight-feature small {
  color: var(--memory-lane-teal) !important;
  font-size: 0.6rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.09em !important;
  text-transform: uppercase !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-insight-feature h3,
html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-insight-feature p,
html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-country-cloud p {
  margin: 0 !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-insight-feature p,
html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-country-cloud p {
  color: var(--memory-lane-muted) !important;
  font-size: 0.74rem !important;
  line-height: 1.45 !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card .relive-memory-action,
html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-compact-relive {
  position: relative !important;
  z-index: 2 !important;
  touch-action: manipulation !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card .relive-memory-action:active,
html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-compact-relive:active {
  transform: translateY(1px) !important;
}

@media (max-width: 760px) {
  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-view-intro {
    grid-template-columns: auto minmax(0, 1fr) !important;
    gap: 10px !important;
    padding: 13px !important;
    border-radius: 15px !important;
  }

  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-view-intro > small {
    grid-column: 2 !important;
    justify-self: start !important;
    padding: 0 !important;
    background: transparent !important;
  }

  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-view-intro p {
    font-size: 0.69rem !important;
  }

  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-compact-list {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-insights-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-year-group,
  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-story-collection,
  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-country-cloud,
  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-insight-feature {
    padding: 12px !important;
    border-radius: 15px !important;
  }

  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-compact-card {
    grid-template-columns: 58px minmax(0, 1fr) auto !important;
    gap: 9px !important;
    min-height: 78px !important;
    padding: 8px !important;
  }

  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-compact-art {
    width: 58px !important;
    height: 58px !important;
    border-radius: 10px !important;
  }

  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-compact-relive {
    min-width: 46px !important;
    width: 46px !important;
    min-height: 46px !important;
    padding: 0 !important;
    border-radius: 12px !important;
  }

  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-compact-relive > span:first-child {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
  }

  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-insights-grid .stat-card {
    min-height: 78px !important;
    padding: 12px 14px !important;
  }
}

/* Build 631: override the shared card-child baseline so Relive content sits
   in the true optical center of every memory-card action. */
html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card .relive-memory-action > *,
html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-compact-relive > * {
  align-self: center !important;
  line-height: 1 !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card .relive-memory-action > svg {
  display: block !important;
  width: 17px !important;
  height: 17px !important;
  flex: 0 0 17px !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList article.memory-lane-card .relive-memory-action > .memory-action-label,
html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel .memory-lane-compact-relive > span {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}
