/* Map-home composition. Keep reader, Blox and search-result drawers unchanged. */
.map-home-shell {
  --map-home-target: calc(var(--ds-space-10) + var(--ds-space-1));
}
.map-home-shell :is(.map-home-panel, .map-home-mobile, .mb-discovery) {
  font-family: var(--ds-font-sans);
  color: var(--ds-ink);
}
.map-home-shell .map-home-panel {
  background: var(--ds-card);
  border: 1px solid var(--ds-line);
  border-radius: var(--ds-radius-xl);
  box-shadow: var(--ds-shadow-elevated);
}
.map-home-shell .map-home-panel .block-panel-content {
  overscroll-behavior-y: contain;
  scrollbar-width: thin;
}
.map-home-shell .map-intro {
  padding: var(--ds-space-6) var(--ds-space-5) var(--ds-space-4);
  gap: var(--ds-space-3);
  background: var(--ds-card);
  border-color: var(--ds-line);
}
.map-home-eyebrow {
  margin: 0;
  color: var(--ds-link);
  font: 700 var(--ds-font-size-overline)/var(--ds-line-height-overline) var(--ds-font-sans);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.map-home-shell .map-intro .seo-page-header h1 {
  margin: 0;
  color: var(--ds-ink);
  font: 600 var(--ds-font-size-h3)/var(--ds-line-height-h3) var(--ds-font-display);
  overflow-wrap: break-word;
}
.map-home-shell .map-intro .seo-answer-line {
  margin-top: var(--ds-space-3);
  font: var(--ds-font-size-body)/var(--ds-line-height-body) var(--ds-font-sans);
}
.map-home-shell .map-intro .seo-header-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ds-space-2);
  padding: 0;
  margin: var(--ds-space-4) 0 0;
  overflow: visible;
}
.map-home-shell .map-intro .seo-header-nav a {
  flex: 0 1 auto;
  min-width: 0;
  min-height: var(--map-home-target);
  padding: var(--ds-space-2) var(--ds-space-3);
  border: 1px solid var(--ds-line);
  border-radius: var(--ds-radius-md);
  background: var(--ds-card);
  color: var(--ds-ink);
  font: 500 var(--ds-font-size-bodySm)/var(--ds-line-height-bodySm) var(--ds-font-sans);
  text-decoration: none;
  white-space: normal;
}
.map-home-shell .map-intro .seo-header-nav a:hover {
  background: var(--ds-surface);
  border-color: var(--ds-input-border);
}
.map-home-topics { margin-top: var(--ds-space-2); }
.map-home-shell :is(.map-home-topics, .map-home-moments) > summary {
  display: list-item;
  min-height: var(--map-home-target);
  padding: var(--ds-space-3) 0;
  color: var(--ds-ink-soft);
  font: 500 var(--ds-font-size-bodySm)/var(--ds-line-height-bodySm) var(--ds-font-sans);
  cursor: pointer;
}
.map-home-shell .map-home-topics .seo-header-nav { margin-top: 0; }
.map-home-shell .map-home-topics .seo-header-nav a {
  border: 0;
  background: var(--ds-surface);
}
.map-home-shell .map-home-featured {
  padding: var(--ds-space-5);
  border-bottom: 1px solid var(--ds-line);
}
.map-home-shell .map-home-section-title {
  margin: 0;
  color: var(--ds-ink);
  font: 600 var(--ds-font-size-h3)/var(--ds-line-height-h3) var(--ds-font-display);
}
.map-home-shell .featured-memories-container {
  padding: var(--ds-space-4) 0 0;
  background: transparent;
  font-family: var(--ds-font-sans);
}
.map-home-shell .featured-memories-container > .tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--ds-space-2);
  padding: 0;
  margin-bottom: var(--ds-space-5);
  border-radius: 0;
  background: transparent;
}
.map-home-shell .featured-memories-container > .tabs > .tab-btn {
  min-width: 0;
  min-height: var(--map-home-target);
  padding: var(--ds-space-2) var(--ds-space-1);
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--ds-ink-soft);
  font: 500 var(--ds-font-size-caption)/var(--ds-line-height-caption) var(--ds-font-sans);
  overflow-wrap: anywhere;
  box-shadow: none;
}
.map-home-shell .featured-memories-container > .tabs > .tab-btn.active {
  border-bottom-color: var(--ds-brand);
  color: var(--ds-link);
  font-weight: 600;
}
.map-home-shell .map-home-moments {
  margin: 0 var(--ds-space-5);
  border-bottom: 1px solid var(--ds-line);
}
.map-home-shell .map-home-moments > summary {
  padding: var(--ds-space-4) 0;
  color: var(--ds-ink);
  font-size: var(--ds-font-size-body);
  line-height: var(--ds-line-height-body);
}
.map-home-shell :is(.map-home-topics, .map-home-moments, .featured-memories-container, .footer-ui) :is(a, button, summary):focus-visible {
  outline: 3px solid var(--ds-focus);
  outline-offset: var(--ds-space-1);
}
.map-home-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: var(--ds-space-12);
  padding: var(--ds-space-3) var(--ds-space-4);
  border: 0;
  border-radius: var(--ds-radius-md);
  background: var(--ds-brand);
  color: var(--ds-on-cta);
  font: 600 var(--ds-font-size-body)/var(--ds-line-height-body) var(--ds-font-sans);
  text-align: center;
  cursor: pointer;
}
.map-home-primary:hover { background: var(--ds-brand-hover); }
.map-home-shell .discover-memory-distance {
  display: block;
  margin-top: var(--ds-space-1);
  color: var(--ds-ink-soft);
  font: 400 var(--ds-font-size-caption)/var(--ds-line-height-caption) var(--ds-font-sans);
}
.map-home-shell .discover-nearby-heading h3 {
  margin: 0;
  font: 600 var(--ds-font-size-h4)/var(--ds-line-height-h4) var(--ds-font-sans);
}
.map-home-shell .discover-nearby-heading p {
  margin: var(--ds-space-1) 0 var(--ds-space-4);
  color: var(--ds-ink-soft);
  font: 400 var(--ds-font-size-bodySm)/var(--ds-line-height-bodySm) var(--ds-font-sans);
}
.map-home-shell :is(.nearby-retry, .nearby-load-more) {
  min-height: var(--ds-space-12);
  padding: var(--ds-space-3) var(--ds-space-4);
  border: 0;
  border-radius: var(--ds-radius-sm);
  background: var(--ds-brand);
  color: var(--ds-on-cta);
  font: 600 var(--ds-font-size-bodySm)/var(--ds-line-height-bodySm) var(--ds-font-sans);
  cursor: pointer;
}
.map-home-shell :is(.nearby-retry, .nearby-load-more):focus-visible {
  outline: 3px solid var(--ds-focus);
  outline-offset: var(--ds-space-1);
}
/* Keep the home action centered on the map, including a desktop response
   resized below the mobile breakpoint. Its width includes the frame padding. */
.map-home-shell.server-desktop .footer-ui:has(> .map-home-primary) {
  position: fixed !important;
  left: 50%;
  right: auto;
  bottom: var(--ds-space-4);
  transform: translateX(-50%);
  box-sizing: border-box;
  width: min(286px, calc(100vw - var(--ds-space-8)));
  padding: var(--ds-space-3) !important;
  border: 1px solid var(--ds-line);
  border-radius: var(--ds-radius-xl);
  background: var(--ds-card);
  box-shadow: var(--ds-shadow-card);
}
.map-home-shell .map-home-primary { box-sizing: border-box; }
/* Experimental shelves share the same typography and the repaired carousel. */
.map-home-shell .mb-discovery { font-family: var(--ds-font-sans); }
.map-home-shell .mb-discovery .map-intro { padding: var(--ds-space-5); }
@media (min-width: 813px) {
  .map-home-shell.server-desktop .map-home-panel {
    width: min(416px, calc(100vw - var(--ds-space-8)));
  }
  .map-home-shell.server-desktop .map-home-panel .block-panel-content {
    max-height: calc(100dvh - 112px);
  }
}
@media (max-width: 812px) {
  .map-home-shell .map-intro { padding: var(--ds-space-5) var(--ds-space-4) var(--ds-space-3); }
  .map-home-shell .map-home-mobile { min-width: 0; }
  .map-home-shell .map-home-mobile > * { flex-shrink: 0; }
  .map-home-shell .map-home-moments { margin-inline: var(--ds-space-4); }
  /* Resizing a desktop window keeps its server-rendered desktop markup.
     Do not inherit the mobile drawer's collapsed 68px panel in that case. */
  .map-home-shell.server-desktop .block-interface:has(> .map-home-panel) {
    position: relative;
    bottom: auto;
    width: 100%;
    overflow: visible;
  }
  .map-home-shell.server-desktop .map-home-panel {
    width: min(416px, calc(100vw - var(--ds-space-8)));
    min-height: 0;
    max-height: none;
  }
  .map-home-shell.server-desktop .map-home-panel .block-panel-content {
    max-height: calc(100dvh - 192px);
  }
}
