/* Mobile feedback: fill the available viewport and keep controls in safe areas. */
.map-home-page { margin: 0; }
.map-home-page .map-home {
  min-height: 0;
  height: 100vh;
  height: 100dvh;
  --sheet-small: clamp(136px, 18dvh, 158px);
  --sheet-medium: 50dvh;
  --sheet-large: calc(100dvh - 62px - env(safe-area-inset-bottom) - env(safe-area-inset-top) - 16px);
  --sheet-current: var(--sheet-small);
}
.map-home-page .map-home:has([data-snap="medium"]) { --sheet-current: var(--sheet-medium); }
.map-home-page .map-home:has([data-snap="large"]) { --sheet-current: var(--sheet-large); }
.map-home-page .map-home__brand { display: flex; align-items: center; gap: 8px; }
.map-home-page .map-home__brand-copy { flex: 1; }
.map-home-page .map-home__brand-tools { flex-shrink: 0; }
.map-home-page .map-home__header-actions { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.map-home-page .potalk-language select { width: 94px; min-height: 36px; padding: 5px; border: 1px solid #d6e0e9; border-radius: 10px; font-size: 16px; background: #fff; }
.map-home-page .bottom-sheet { display: flex; flex-direction: column; height: var(--sheet-small); }
.map-home-page .bottom-sheet[data-snap="medium"] { height: var(--sheet-medium); }
.map-home-page .bottom-sheet[data-snap="large"] { height: var(--sheet-large); max-height: var(--sheet-large); }
.map-home-page .bottom-sheet.is-dragging { height: var(--sheet-drag-height); transition: none; }
.map-home-page .bottom-sheet__drag-zone { height: 22px; flex: 0 0 22px; }
.map-home-page .bottom-sheet__heading { min-height: 32px; flex: 0 0 auto; }
.map-home-page .spot-results { flex: 1; min-height: 0; height: auto; overscroll-behavior: contain; }
/* Grid rows must keep the card's content height, even in a short scroll viewport. */
.map-home-page .bottom-sheet[data-snap="large"] .spot-results {
  grid-template-columns: minmax(0, 1fr);
  grid-auto-rows: max-content;
  align-items: start;
}
.map-home-page .spot-result__main-row { min-height: 90px; }
.map-home-page .spot-result__main-row > div { min-width: 0; flex: 1; }
.map-home-page .spot-result__main-row > .spot-result__image { flex: 0 0 auto; }
.map-home-page .spot-result__title-row h2 { overflow-wrap: anywhere; }
.map-home-page .bottom-sheet[data-snap="medium"] .spot-results { overflow-y: auto; }
.map-home-page .map-home__controls { bottom: calc(var(--sheet-current) + var(--mobile-tabs-height) + env(safe-area-inset-bottom) + 10px); }
.map-home-page .map-home .search-area-button { bottom: calc(var(--sheet-current) + var(--mobile-tabs-height) + env(safe-area-inset-bottom) + 10px); }
.map-home-page .map-home__map .leaflet-control-attribution { margin-bottom: calc(var(--sheet-current) + var(--mobile-tabs-height) + env(safe-area-inset-bottom) + 3px); }
.map-home-page .map-home:has([data-snap="large"]) .map-home__controls,
.map-home-page .map-home:has([data-snap="large"]) .search-area-button { display: none; }
.spot-result__image { position: relative; flex-shrink: 0; }
.spot-result__image .spot-result__cover { display: block; }
.spot-result__image small { position: absolute; bottom: 3px; left: 3px; padding: 1px 3px; background: #ffffffeb; color: #51646a; font-size: 8px; border-radius: 3px; }
.spot-app__illustration-label { position: absolute; z-index: 2; right: 14px; bottom: 24px; background: #ffffffeb; padding: 4px 9px; border-radius: 8px; color: #26312d; font-size: 11px; }
.spot-app__illustration img { display: block; width: 100%; border-radius: 12px; }
.spot-app__radius-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
.spot-app__radius-metrics b { font-size: 15px; overflow-wrap: anywhere; line-height: 1.5; }
.spot-app__hero { height: calc(252px + env(safe-area-inset-top)); }
@media (max-height: 540px) {
  .map-home-page .map-home__brand-copy small { display: none; }
  .map-home-page .map-home__brand { min-height: 35px; }
  .map-home-page .quick-filters { margin-top: 3px; }
  .map-home-page .map-home { --sheet-small: 128px; }
  .map-home-page .spot-result__cover { height: 64px; }
  .map-home-page .spot-result__main-row { min-height: 64px; }
}
@media (prefers-reduced-motion: reduce) { .map-home-page .bottom-sheet { transition: none; } }

.map-home-page .bottom-sheet[data-snap="small"] .spot-result__title-row h2,
.map-home-page .bottom-sheet[data-snap="small"] .spot-result__place {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
