/* STEP9: search panel; scoped to the MAP home. */
.map-home-page .map-search-panel {
  pointer-events: auto;
  margin-top: 8px;
  padding: 14px;
  border: 1px solid rgba(23, 32, 29, .12);
  border-radius: 17px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 9px 28px rgba(26, 42, 35, .18);
}
.map-home-page .map-search-panel[hidden] { display: none; }
.map-home-page .map-search-panel label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 750;
  color: #26312d;
}
.map-home-page .map-search-panel__row {
  display: flex;
  gap: 8px;
}
.map-home-page .map-search-panel input {
  min-width: 0;
  width: 100%;
  flex: 1;
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid #ccd6d0;
  border-radius: 10px;
  font-size: 16px;
  background: #fff;
}
.map-home-page .map-search-panel__row button {
  min-width: 66px;
  border: 0;
  border-radius: 10px;
  background: #1f7a5a;
  color: #fff;
  font-weight: 750;
}
.map-home-page .map-search-panel__actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
}
.map-home-page .map-search-panel__actions button {
  min-height: 36px;
  border: 0;
  background: transparent;
  color: #245f4a;
  font-weight: 700;
}
.map-home-page .map-search-panel p {
  margin: 0;
  font-size: 12px;
  color: #4b5952;
}
.map-home-page .map-search-panel :focus-visible {
  outline: 3px solid #2c8b68;
  outline-offset: 2px;
}

/* STEP10: compact detailed filters on mobile. */
.map-home-page .map-detail-filter {
  pointer-events: auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-height: min(66dvh, 530px);
  overflow-y: auto;
  margin-top: 8px;
  padding: 14px;
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 9px 28px rgba(26, 42, 35, .18);
}
.map-home-page .map-detail-filter[hidden] { display: none; }
.map-home-page .map-detail-filter > strong,
.map-home-page .map-detail-filter__actions { grid-column: 1 / -1; }
.map-home-page .map-detail-filter label {
  display: grid;
  gap: 5px;
  min-width: 0;
  font-size: 12px;
  font-weight: 700;
}
.map-home-page .map-detail-filter select {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 6px;
  border: 1px solid #ccd6d0;
  border-radius: 9px;
  background: #fff;
  font-size: 14px;
}
.map-home-page .map-detail-filter__actions {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.map-home-page .map-detail-filter__actions button {
  min-height: 42px;
  padding: 6px 12px;
  border: 1px solid #cbd7d0;
  border-radius: 9px;
  background: #fff;
  color: #245f4a;
  font-weight: 750;
}
.map-home-page .map-detail-filter__actions button[type="submit"] {
  border-color: #1f7a5a;
  background: #1f7a5a;
  color: #fff;
}
.map-home-page .spot-results[hidden],
.map-home-page .empty-results[hidden] { display: none; }
.map-home-page .spot-result__detail-link {
  position: relative;
  z-index: 3;
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  margin-top: 8px;
  padding: 0 12px;
  border-radius: 9px;
  background: #1f7a5a;
  color: #fff;
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
}

/* Spot-centric MVP: selected radius controls, not restaurant filters. */
.map-home-page .map-radius {
  display: flex;
  align-items: center;
  gap: 7px;
  pointer-events: auto;
  min-width: 0;
  margin: 0;
  padding: 2px 0 4px;
  border: 0;
}
.map-home-page .map-radius legend {
  padding: 0 0 3px;
  color: #344e41;
  font-size: 11px;
  font-weight: 850;
}
.map-home-page .map-radius legend small {
  color: #586b62;
  font-size: 10px;
  font-weight: 500;
}
.map-home-page .map-radius label {
  position: relative;
  cursor: pointer;
}
.map-home-page .map-radius input {
  position: absolute;
  opacity: 0;
}
.map-home-page .map-radius label span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 14px;
  border: 1px solid #c6d9ce;
  border-radius: 999px;
  background: #fff;
  color: #325b48;
  font-size: 12px;
  font-weight: 800;
}
.map-home-page .map-radius input:checked + span {
  border-color: #1f7a5a;
  background: #1f7a5a;
  color: #fff;
}
.map-home-page .map-radius input:focus-visible + span {
  outline: 3px solid #7db8e2;
  outline-offset: 2px;
}
.map-home-page .map-home__controls {
  top: calc(183px + env(safe-area-inset-top));
}
.map-home-page:has(.map-search-panel:not([hidden])) .map-home__controls,
.map-home-page:has(.map-detail-filter:not([hidden])) .map-home__controls {
  display: none;
}
.map-home-page .spot-result__radius {
  margin-top: 8px;
  padding: 9px 10px;
  border: 1px solid #d9e9dd;
  border-radius: 10px;
  background: #f3f8f3;
}
.map-home-page .spot-result__radius-title {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  margin: 0 0 5px;
  font-size: 11px;
  font-weight: 850;
}
.map-home-page .spot-result__radius-title span {
  color: #668070;
  font-size: 9px;
  font-weight: 650;
}
.map-home-page .spot-result__radius-metrics {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12px;
}
.map-home-page .spot-result__radius-metrics strong {
  color: #1f7a5a;
  font-size: 14px;
}
.map-home-page .spot-result__radius-note {
  margin: 5px 0 0;
  color: #62766b;
  font-size: 10px;
  line-height: 1.5;
}
.map-home-page .spot-result__strengths:empty { display: none; }
.map-home-page .spot-result__visual--area::before {
  background: linear-gradient(135deg, #7e688c, #3e304a);
}
@media (max-width: 390px) {
  .map-home-page .map-radius label span { padding: 4px 11px; }
}

.map-home-page .quick-filter:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

/* Mockup-inspired spot-first map header and card photography. */
.map-home-page .map-home__brand {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 33px;
  padding: 0 4px 6px;
  pointer-events: none;
}
.map-home-page .map-home__brand strong {
  color: #123d42;
  font-size: 21px;
  font-weight: 900;
  letter-spacing: -.035em;
}
.map-home-page .map-home__brand small {
  color: #52716a;
  font-size: 10px;
  font-weight: 750;
}
.map-home-page .map-home__controls {
  top: calc(218px + env(safe-area-inset-top));
}
.map-home-page .spot-result__main-row {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 88px;
}
.map-home-page .spot-result__main-row > div {
  min-width: 0;
  flex: 1;
}
.map-home-page .spot-result__cover {
  display: block;
  flex: 0 0 88px;
  width: 88px;
  height: 88px;
  border-radius: 11px;
  object-fit: cover;
}
.map-home-page .spot-result__cover--empty {
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(140deg, #56a28a, #146a67);
  font-size: 27px;
  font-weight: 900;
}
.map-home-page .spot-result__title-row h2 { font-size: 15px; }
.map-home-page .spot-result__place {
  margin-bottom: 0;
  line-height: 1.65;
}
@media(max-width:390px) {
  .map-home-page .spot-result__cover { flex-basis: 78px; width: 78px; height: 78px; }
  .map-home-page .map-home__controls { top: calc(215px + env(safe-area-inset-top)); }
}
/* Four-screen visual alignment: clean header, photo card and fixed mobile tabs. */
.map-home-page .map-home {
  --sheet-small: 202px;
  --mobile-tabs-height: 66px;
}
.map-home-page .map-home__top {
  padding: calc(12px + env(safe-area-inset-top)) 14px 7px;
  background: #fff;
  box-shadow: 0 2px 13px #1b3b4720;
}
.map-home-page .map-home__brand { min-height: 43px; padding: 0 5px 8px; }
.map-home-page .map-home__brand strong { font-size: 24px; color: #141d26; }
.map-home-page .map-home__header-actions { display: flex; align-items: center; gap: 9px; }
.map-home-page .map-home__header-actions button {
  display: grid; place-items: center; width: 34px; height: 34px;
  padding: 5px; border: 0; border-radius: 50%;
  background: #f0f4f8; color: #6f8294;
}
.map-home-page .map-home__header-actions button:first-child { background: #fff; color: #1c3040; }
.map-home-page .map-home__header-actions svg {
  width: 22px; height: 22px; fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.map-home-page .map-search {
  min-height: 45px; border: 1px solid #d6e0e9; border-radius: 24px;
  box-shadow: none; background: #fff;
}
.map-home-page .map-search__field span { font-weight: 500; color: #728091; }
.map-home-page .map-search__filter { border-left: 0!important; border-radius: 50%; }
.map-home-page .quick-filters { margin-top: 9px; padding-bottom: 3px; }
.map-home-page .quick-filter {
  min-height: 33px; padding: 5px 11px; border: 0;
  background: #eaf4ff; color: #166ac1; box-shadow: none; font-size: 11px;
}
.map-home-page .quick-filter:first-child { background: #e6f7e9; color: #1b8058; }
.map-home-page .quick-filter:disabled { opacity: .55; }
.map-home-page .map-radius { display: none; }
.map-home-page .map-home__controls {
  top: auto!important; bottom: calc(var(--sheet-small) + var(--mobile-tabs-height) + 13px);
  right: 13px; gap: 8px;
}
.map-home-page .layer-control { order: 2; }
.map-home-page #locate-button { order: 1; }
.map-home-page .map-round-button {
  width: 45px; height: 45px; border-radius: 50%; background: #fff;
}
.map-home-page .search-area-button {
  bottom: calc(var(--sheet-small) + var(--mobile-tabs-height) + 14px);
}
.map-home-page .bottom-sheet {
  bottom: calc(var(--mobile-tabs-height) + env(safe-area-inset-bottom));
  height: var(--sheet-small); padding: 0;
  border-radius: 21px 21px 0 0; background: #fff;
}
.map-home-page .bottom-sheet[data-snap="medium"] { height: 50dvh; }
.map-home-page .bottom-sheet[data-snap="large"] {
  height: calc(100dvh - 170px - var(--mobile-tabs-height));
}
.map-home-page .bottom-sheet__drag-zone { height: 18px; }
.map-home-page .bottom-sheet__heading { min-height: 35px; padding: 0 15px 3px; }
.map-home-page .bottom-sheet h1 { font-size: 13px; }
.map-home-page .bottom-sheet__kicker { display: none; }
.map-home-page .sheet-snap-buttons { padding: 1px; }
.map-home-page .sheet-snap-buttons button { min-height: 26px; }
.map-home-page .spot-results {
  height: calc(100% - 53px); gap: 7px; padding: 0 13px 8px;
}
.map-home-page .spot-result { flex-basis: min(365px,calc(100vw - 26px)); border-radius: 13px; }
.map-home-page .spot-result__main-row { min-height: 97px; }
.map-home-page .spot-result__cover { height: 92px; width: 95px; flex-basis: 95px; }
.map-home-page .spot-result__body { padding: 9px 10px; }
.map-home-page .bottom-sheet[data-snap="small"] .spot-result__radius,
.map-home-page .bottom-sheet[data-snap="small"] .spot-result__meta,
.map-home-page .bottom-sheet[data-snap="small"] .spot-result__detail-link { display: none; }
.map-home-page .map-home__bottom-nav {
  position: absolute; z-index: 1200; bottom: 0; left: 0; right: 0;
  display: grid; grid-template-columns: repeat(5,minmax(0,1fr));
  min-height: calc(var(--mobile-tabs-height) + env(safe-area-inset-bottom));
  padding: 7px 7px calc(9px + env(safe-area-inset-bottom));
  border-top: 1px solid #e2e9ef; background: #fff;
  box-shadow: 0 -3px 12px #102f4020;
}
.map-home-page .map-home__bottom-nav a,
.map-home-page .map-home__bottom-nav button {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; min-width: 0; padding: 0; border: 0; background: transparent;
  color: #5e7185; font: inherit; text-decoration: none; cursor: pointer;
}
.map-home-page .map-home__bottom-nav a[aria-current="page"] { color: #126ce0; }
.map-home-page .map-home__bottom-nav button:disabled { opacity: .54; cursor: not-allowed; }
.map-home-page .map-home__bottom-nav span { font-size: 23px; line-height: 1.1; }
.map-home-page .map-home__bottom-nav small { font-size: 10px; font-weight: 750; }
@media(max-width:390px) {
  .map-home-page .spot-result__cover { width: 82px; flex-basis: 82px; height: 87px; }
  .map-home-page .spot-result__main-row { min-height: 90px; }
  .map-home-page .map-home__header-actions { gap: 4px; }
}
.map-home-page .map-home__bottom-nav svg {
  width: 23px; height: 23px; fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.map-home-page .map-home__map .leaflet-control-attribution {
  margin-bottom: calc(var(--sheet-small) + var(--mobile-tabs-height) + 8px);
  font-size: 9px; background: #ffffffd9;
}

/* The focused landmark uses the red location pin from the supplied mockup. */
.map-home-page .potalk-marker--park.is-selected { background: #e94759; }

/* 2026-10 feedback v3: compact concept, larger MAP, type markers and featured badge. */
.map-home-page .map-home {
  --sheet-small: 14dvh;
  --mobile-tabs-height: 62px;
}
.map-home-page .map-home__top {
  padding: calc(8px + env(safe-area-inset-top)) 12px 5px;
}
.map-home-page .map-home__brand {
  min-height: 46px;
  padding: 0 4px 5px;
  pointer-events: auto;
}
.map-home-page .map-home__brand-copy {
  display: grid;
  min-width: 0;
  gap: 1px;
}
.map-home-page .map-home__brand-copy strong {
  color: #141d26;
  font-size: 22px;
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -.035em;
}
.map-home-page .map-home__brand-copy span {
  color: #21313c;
  font-size: 10px;
  line-height: 1.25;
  font-weight: 850;
}
.map-home-page .map-home__brand-copy small {
  color: #6b7884;
  font-size: 9px;
  line-height: 1.2;
  font-weight: 650;
}
.map-home-page .map-search { min-height: 42px; }
.map-home-page .quick-filters { margin-top: 6px; padding-bottom: 2px; }
.map-home-page .quick-filter { min-height: 29px; padding: 4px 10px; font-size: 10px; }
.map-home-page .map-radius {
  display: flex;
  margin-top: 4px;
  padding: 0;
}
.map-home-page .map-radius legend {
  min-width: 58px;
  padding-right: 3px;
  font-size: 10px;
}
.map-home-page .map-radius legend small { display: none; }
.map-home-page .map-radius label span {
  min-height: 25px;
  padding: 2px 10px;
  font-size: 10px;
}
.map-home-page .map-home__controls {
  bottom: calc(var(--sheet-small) + var(--mobile-tabs-height) + 10px);
}
.map-home-page .search-area-button {
  bottom: calc(var(--sheet-small) + var(--mobile-tabs-height) + 11px);
}
.map-home-page .bottom-sheet[data-snap="medium"] { height: 50dvh; }
.map-home-page .bottom-sheet[data-snap="large"] { height: 88dvh; max-height: calc(100dvh - var(--mobile-tabs-height)); }
.map-home-page .bottom-sheet__heading { min-height: 31px; padding-bottom: 2px; }
.map-home-page .bottom-sheet__drag-zone { height: 15px; }
.map-home-page .spot-results { height: calc(100% - 46px); }
.map-home-page .spot-result__main-row { min-height: 83px; }
.map-home-page .spot-result__cover { width: 80px; height: 80px; flex-basis: 80px; }
.map-home-page .spot-result__title-row { align-items: center; }
.map-home-page .spot-result__score {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  min-width: max-content;
  color: #53705f;
  font-size: 8px;
  font-weight: 850;
}
.map-home-page .spot-result__score b { color: #176b50; font-size: 18px; line-height: 1; }
.map-home-page .spot-result__score.is-pending { color: #8b9791; }
.map-home-page .spot-result__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 5px;
}
.map-home-page .spot-result__badges > span {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #eef4f8;
  color: #486170;
  font-size: 9px;
  font-weight: 750;
}
.map-home-page .spot-result__environment-state {
  background: #e9f5ef!important;
  color: #247255!important;
}
.map-home-page .spot-result__environment-state.is-pending {
  background: #f0f3f6!important;
  color: #6d7a86!important;
}
.map-home-page .spot-result__featured {
  color: #8a6400!important;
  background: #fff5ca!important;
}
.map-home-page .map-detail-filter input[type="search"] {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 6px 8px;
  border: 1px solid #ccd6d0;
  border-radius: 9px;
  background: #fff;
  font-size: 14px;
}
/* POTALK spots use type icons only. Rank and score never appear inside the map marker. */
.map-home-page .potalk-marker {
  width: 40px;
  height: 40px;
  border-radius: 50% 50% 50% 10px;
  transform: rotate(-45deg);
  background: #397c5d;
}
.map-home-page .potalk-marker__icon {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  transform: rotate(45deg);
}
.map-home-page .potalk-marker__icon svg {
  width: 21px;
  height: 21px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.map-home-page .potalk-marker--park .potalk-marker__icon svg path:first-child { fill: currentColor; stroke: none; }
.map-home-page .potalk-marker--park { background: #21835d; }
.map-home-page .potalk-marker--station { background: #2674c7; }
.map-home-page .potalk-marker--area { background: #7658a2; }
.map-home-page .potalk-marker--cafe { background: #a66b46; }
.map-home-page .potalk-marker--restaurant { background: #c05b4c; }
.map-home-page .potalk-marker--facility,
.map-home-page .potalk-marker--shop { background: #9a7a31; }
.map-home-page .potalk-marker--station,
.map-home-page .potalk-marker--restaurant,
.map-home-page .potalk-marker--facility { transform: rotate(-45deg); border-radius: 50% 50% 50% 10px; clip-path: none; }
.map-home-page .potalk-marker--station .potalk-marker__icon,
.map-home-page .potalk-marker--restaurant .potalk-marker__icon,
.map-home-page .potalk-marker--facility .potalk-marker__icon { transform: rotate(45deg); }
.map-home-page .potalk-marker.is-selected,
.map-home-page .potalk-marker--station.is-selected,
.map-home-page .potalk-marker--restaurant.is-selected,
.map-home-page .potalk-marker--facility.is-selected {
  transform: rotate(-45deg) scale(1.13);
  box-shadow: 0 0 0 4px rgba(255,255,255,.82), 0 5px 14px rgba(23,32,29,.34);
}
.map-home-page .potalk-marker__featured {
  position: absolute;
  top: -8px;
  right: -8px;
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  transform: rotate(45deg);
  border: 2px solid #fff;
  border-radius: 50%;
  background: #f3b51e;
  color: #fff;
  font-size: 10px;
  line-height: 1;
}
.map-home-page .potalk-marker--park.is-selected { background: #21835d; }
@media (max-width:390px) {
  .map-home-page .map-home { --sheet-small: 14dvh; }
  .map-home-page .map-home__brand-copy strong { font-size: 21px; }
  .map-home-page .spot-result__cover { width: 76px; height: 76px; flex-basis: 76px; }
}
@media (max-height:650px) {
  .map-home-page .map-home { --sheet-small: 16dvh; }
}

/* Final feedback pass: keep the initial MAP dominant while retaining an expandable sheet. */
.map-home-page .map-radius { margin-top: 2px; }
.map-home-page .map-radius legend { display: none; }
.map-home-page .bottom-sheet[data-snap="small"] .spot-result__main-row { min-height: 64px; }
.map-home-page .bottom-sheet[data-snap="small"] .spot-result__cover {
  width: 58px; height: 58px; flex-basis: 58px; border-radius: 9px;
}
.map-home-page .bottom-sheet[data-snap="small"] .spot-result__body { padding: 6px 8px; }
.map-home-page .bottom-sheet[data-snap="small"] .spot-result__title-row h2 { font-size: 13px; line-height: 1.25; }
.map-home-page .bottom-sheet[data-snap="small"] .spot-result__place { font-size: 9px; line-height: 1.35; }
.map-home-page .bottom-sheet[data-snap="small"] .spot-result__badges > span:not(.spot-result__featured) { display: none; }
.map-home-page .bottom-sheet[data-snap="small"] .spot-result__featured { min-height: 17px; padding: 1px 5px; font-size: 8px; }
.map-home-page .bottom-sheet[data-snap="small"] .spot-result__score { font-size: 7px; }
.map-home-page .bottom-sheet[data-snap="small"] .spot-result__score b { font-size: 15px; }

.map-home-page .pt-cluster{display:flex;align-items:center;justify-content:center;position:relative;width:48px;height:48px;border:3px solid #fff;border-radius:50%;background:#176bc2;color:#fff;box-shadow:0 2px 8px #163e6655,0 0 0 5px #2388d92c}
.map-home-page .pt-cluster.is-selected{background:#153b6b;box-shadow:0 2px 8px #163e6655,0 0 0 5px #2388d955}
.map-home-page .pt-cluster svg{width:30px;height:30px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.map-home-page .pt-cluster>span{position:absolute;right:-3px;bottom:-2px;width:18px;height:18px;display:grid;place-items:center;border-radius:50%;background:#fff;color:#176bc2;font-size:16px;font-weight:800;line-height:1}
.map-home-page .pt-cluster-wrap:focus-visible{outline:3px solid #132f50;outline-offset:6px;border-radius:50%}
.pt-cluster-list{max-height:min(240px,35dvh);overflow:auto;min-width:180px}
.pt-cluster-list>strong{display:block;margin:0 0 8px;font-size:13px;color:#18303b}
.pt-cluster-list>button{display:block;width:100%;min-height:44px;margin:5px 0;padding:9px 10px;border:1px solid #dce5ec;border-radius:8px;background:#f4f8fb;color:#165c9a;text-align:left;font-size:13px;font-weight:700;line-height:1.5;overflow-wrap:anywhere;cursor:pointer}
