body:has(.mapSearch) {
  overflow: hidden;
  background: #f2efe7;
}

.mapSearch {
  position: relative;
  width: 100%;
  height: 100dvh;
  min-height: 600px;
  overflow: hidden;
  background: #ebe7dc;
}

.mapSearch__canvas {
  position: relative;
  width: 100%;
  height: 100%;
}

/* 地圖模式底部閱讀區：柔化圖磚至切換器上方，不覆蓋任何控制項或切換按鈕。 */
.mapSearch__bottomVeil {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 600;
  height: 80px;
  pointer-events: none;
  background: rgb(255 255 255 / 88%);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  -webkit-mask-image: linear-gradient(to top, #000 0%, rgb(0 0 0 / 72%) 42%, transparent 100%);
  mask-image: linear-gradient(to top, #000 0%, rgb(0 0 0 / 72%) 42%, transparent 100%);
}

.mapSearch--listView .mapSearch__bottomVeil {
  display: none;
}

.mapSearch__canvas,
.mapSearch__toolbar,
.mapSearch__advancedButton,
.mapSearch__detailPanel,
.mapSearch__listPanel,
.mapSearch__simpleList,
.mapSearch__overlayTools {
  transition: opacity 180ms ease;
}

.mapSearch.is-view-switching .mapSearch__canvas,
.mapSearch.is-view-switching .mapSearch__toolbar,
.mapSearch.is-view-switching .mapSearch__advancedButton,
.mapSearch.is-view-switching .mapSearch__detailPanel,
.mapSearch.is-view-switching .mapSearch__listPanel,
.mapSearch.is-view-switching .mapSearch__simpleList,
.mapSearch.is-view-switching .mapSearch__overlayTools,
.mapSearch.is-view-switch-entering .mapSearch__canvas,
.mapSearch.is-view-switch-entering .mapSearch__toolbar,
.mapSearch.is-view-switch-entering .mapSearch__advancedButton,
.mapSearch.is-view-switch-entering .mapSearch__detailPanel,
.mapSearch.is-view-switch-entering .mapSearch__listPanel,
.mapSearch.is-view-switch-entering .mapSearch__simpleList,
.mapSearch.is-view-switch-entering .mapSearch__overlayTools {
  pointer-events: none;
  opacity: 0;
}

/* 全站通用定位規則會覆蓋 Leaflet，這裡明確還原地圖控制項的右下角錨點。 */
.mapSearch #rentalMap .leaflet-control-container {
  position: absolute !important;
  inset: 0 !important;
  pointer-events: none;
}

.mapSearch #rentalMap .leaflet-bottom.leaflet-right {
  position: absolute !important;
  right: 14px !important;
  bottom: 16px !important;
  z-index: 1000;
  pointer-events: none;
}

.mapSearch #rentalMap .leaflet-bottom.leaflet-right .leaflet-control {
  position: relative !important;
  pointer-events: auto;
}

.mapSearch__mapVeil {
  position: absolute;
  inset: 0;
  z-index: 800;
  pointer-events: none;
  visibility: hidden;
  background: rgb(232 218 190 / 42%);
  opacity: 0;
  -webkit-backdrop-filter: blur(0);
  backdrop-filter: blur(0);
  transition: opacity 240ms ease, visibility 240ms ease, -webkit-backdrop-filter 240ms ease, backdrop-filter 240ms ease;
}

.mapSearch.is-detail-expanded .mapSearch__mapVeil {
  visibility: visible;
  opacity: 1;
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}

.mapSearch--tenant .leaflet-control-attribution {
  color: rgba(92, 77, 51, 0.68);
  background: rgba(255, 255, 255, 0.72);
}

.mapSearch__toolbar {
  position: fixed;
  top: 80px;
  left: 50%;
  z-index: 1150;
  display: flex;
  align-items: stretch;
  gap: 6px;
  width: fit-content;
  max-width: calc(100% - 48px);
  min-height: 44px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(137, 111, 66, 0.2);
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(104, 83, 45, 0.15);
  transform: translateX(-50%);
}

.mapSearch__modeSwitch {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 700;
  display: inline-flex;
  padding: 4px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(137, 111, 66, 0.24);
  border-radius: 7px;
  box-shadow: 0 8px 22px rgba(104, 83, 45, 0.14);
}

.mapSearch__modeSwitch button {
  min-width: 76px;
  height: 32px;
  padding: 0 10px;
  color: #7d6a4d;
  font: 700 15px / 1 Arial, "Noto Sans TC", sans-serif;
  cursor: pointer;
  background: transparent;
  border: 0;
  border-radius: 4px;
}

.mapSearch__modeSwitch button:disabled {
  cursor: wait;
}

.mapSearch__modeSwitch button:hover,
.mapSearch__modeSwitch button.is-active {
  color: #fff;
  background: #9d7131;
}

.mapSearch__advancedButton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 34px;
  padding: 6px 14px;
  color: #fff;
  font: 700 14px / 1 "Noto Sans TC", sans-serif;
  white-space: nowrap;
  cursor: pointer;
  background: #a77b36;
  border: 0;
  border-radius: 0 0 6px 6px;
  box-shadow: 0 6px 14px rgba(104, 83, 45, 0.18);
}

.mapSearch__advancedButton .material-symbols-outlined {
  font-size: 19px;
}

.mapSearch__advancedButton:hover,
.mapSearch__advancedButton[aria-expanded="true"] {
  color: #fff;
  background: #8d642e;
}

@media screen and (min-width: 1241px) {
  .mapSearch__advancedButton {
    position: fixed;
    top: 132px;
    left: 50%;
    z-index: 1150;
    transform: translateX(-50%);
  }
}

.mapSearch__simpleList {
  display: none;
}

body:has(.mapSearch--listView) {
  overflow: auto;
}

.mapSearch--listView {
  min-height: 100dvh;
  height: auto;
  overflow: visible;
  background: #f8f5ee;
}

.mapSearch--listView .mapSearch__canvas,
.mapSearch--listView .mapSearch__mapVeil,
.mapSearch--listView .mapSearch__detailPanel,
.mapSearch--listView .mapSearch__listPanel,
.mapSearch--listView .mapSearch__overlayTools,
.mapSearch--listView [data-map-locate] {
  display: none;
}

.mapSearch--listView .mapSearch__toolbar {
  position: sticky;
  top: 80px;
}

.mapSearch--listView .mapSearch__simpleList {
  display: block;
  min-height: 100dvh;
  padding: 166px 24px 56px;
}

/* 分享房源在列表模式回到一般內頁流動版面，不使用地圖面板的 fixed 高度與內層卷軸。 */
.mapSearch--listView .mapSearch__sharedRoomPage {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.mapSearch--listView .mapSearch__sharedRoomPage .mapSearch__panelInner {
  display: block;
}

.mapSearch--listView .mapSearch__sharedRoomPage .mapSearch__roomFull {
  height: auto;
  min-height: 0;
  padding-top: 0 !important;
  opacity: 1;
  transform: none;
  animation: none;
}

.mapSearch--listView .mapSearch__sharedRoomPage .mapSearch__fullHeader {
  position: relative;
  height: 65px;
}

.mapSearch--listView .mapSearch__sharedRoomPage .mapSearch__fullContent {
  height: auto;
  padding: 0 28px 28px;
  overflow: visible;
}

.mapSearch--listView .mapSearch__sharedRoomPage .mapSearch__collapse {
  display: none;
}

.mapSearch__simpleListInner {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.mapSearch__simpleList header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding: 0 0 18px;
  border-bottom: 1px solid #e3dccd;
}

.mapSearch__simpleList header p {
  margin: 0 0 6px;
  color: #9d7131;
  font-size: 13px;
  font-weight: 800;
}

.mapSearch__simpleList header h1 {
  margin: 0;
  color: #473d2d;
  font-size: 24px;
}

.mapSearch__simpleListGrid {
  display: grid;
  grid-template-columns: 1fr;
  margin-top: 18px;
}

.mapSearch__simpleRoom {
  display: grid;
  grid-template-columns: 188px minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  min-height: 148px;
  padding: 18px 0;
  cursor: pointer;
  border-bottom: 1px solid #e6dfd2;
}

.mapSearch__simpleRoomPhoto {
  position: relative;
  width: 188px;
  height: 126px;
  overflow: hidden;
  background: #e6e0d5;
  border-radius: 5px;
}

.mapSearch__simpleRoomPhoto img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mapSearch__simpleRoomPhoto > span {
  position: absolute;
  right: 6px;
  bottom: 6px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px 5px;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  background: rgb(41 37 31 / 76%);
  border-radius: 3px;
}

.mapSearch__simpleRoomPhoto .material-symbols-outlined {
  font-size: 14px;
}

.mapSearch__simpleRoomInfo {
  min-width: 0;
}

.mapSearch__simpleRoomType {
  display: inline-block;
  padding: 4px 7px;
  color: #8b652d;
  font-size: 11px;
  font-weight: 800;
  background: #f4ead7;
  border-radius: 4px;
}

.mapSearch__simpleRoom h2 {
  margin: 7px 0 8px;
  color: #33424a;
  font-size: 18px;
  line-height: 1.4;
}

.mapSearch__simpleRoom p {
  margin: 0;
  color: #798185;
  font-size: 13px;
  line-height: 1.6;
}

.mapSearch__simpleRoomLocation,
.mapSearch__simpleRoomHighlight {
  margin-top: 3px !important;
}

.mapSearch__simpleRoomLocation {
  display: flex;
  align-items: center;
  gap: 3px;
}

.mapSearch__simpleRoomLocation .material-symbols-outlined {
  color: #9d7131;
  font-size: 16px;
}

.mapSearch__simpleRoomHighlight {
  color: #8b652d !important;
}

.mapSearch__simpleRoom > strong {
  color: #a26d2d;
  align-self: center;
  font-size: 22px;
  white-space: nowrap;
}

.mapSearch__simpleRoom > strong small {
  margin-left: 3px;
  color: #8a8174;
  font-size: 12px;
  font-weight: 700;
}

.mapSearch__simpleListEmpty {
  width: min(1120px, calc(100% - 48px));
  margin: 166px auto 56px;
  padding: 36px 24px;
  color: #766b5b;
  text-align: center;
  background: #fff;
  border: 1px solid #e5ddcf;
  border-radius: 8px;
}

.mapSearch__filter {
  position: relative;
  display: grid;
  grid-template-columns: auto max-content;
  align-items: center;
  gap: 5px;
  padding: 0 7px;
  border-right: 1px solid #e6dfd0;
}

/* 縣市與行政區視為同一組條件，移除中間分隔線並收緊間距。 */
.mapSearch__filter:has(select[data-map-filter="city"]) {
  padding-right: 0;
  border-right: 0;
}

.mapSearch__filter--district {
  padding-left: 0;
}

/* 模式切換已獨立放在右上，收起工具列末端的資訊與操作按鈕。 */
.mapSearch__toolbar .mapSearch__result,
.mapSearch__toolbar [data-map-locate],
.mapSearch__toolbar [data-map-refresh] {
  display: none;
}

.mapSearch__checkGroup {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: auto;
  margin: 0;
  padding: 4px;
  border: 0;
  border-right: 1px solid #e6dfd0;
}

.mapSearch__checkGroup legend {
  float: left;
  padding: 0;
  margin-right: 7px;
  color: #7d7060;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.mapSearch__checkGroup > .mapSearch__advancedLegend,
.mapSearch__rentRange > .mapSearch__advancedLegend {
  position: absolute;
  top: 0;
  left: 11px;
  display: none;
  padding: 0;
  margin: 0;
  color: #7d7060;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.mapSearch__advancedLegend,
.mapSearch__advancedOnly {
  display: none;
}

.mapSearch__check.mapSearch__advancedOnly {
  display: none;
}

.mapSearch__check {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 9px;
  font: 500 14px / 1.45 Arial, "Noto Sans TC", sans-serif;
  white-space: nowrap;
}

/* 保留房源身分類別色彩；勾選狀態仍採共用按鈕式 checkbox，不顯示勾勾。 */
.mapSearch__check:has(input[data-map-filter="housingType"][value="social"]:checked) {
  color: #718b0d;
  border-color: #9cba27;
}

.mapSearch__check:has(input[data-map-filter="housingType"][value="general"]:checked) {
  color: #b6804f;
  border-color: #cca078;
}

.mapSearch__check:has(input[data-map-filter="serviceType"][value="professional"]:checked) {
  color: #eab23b;
  border-color: #eab23b;
}

.mapSearch__check:has(input[data-map-filter="serviceType"][value="independent"]:checked) {
  color: #51b89b;
  border-color: #51b89b;
}

.mapSearch__check.is-disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.mapSearch__check.is-disabled input {
  cursor: not-allowed;
}

.mapSearch__filter > span {
  visibility: hidden;
  position: absolute;
  top: 0;
  left: 11px;
  color: #7d7060;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.mapSearch__filter--selectOnly {
  display: flex;
}

/* 可輸入也可選擇建議值的數字欄位，供租金、預算等區間條件共用。 */
.mapSearch__rentRange {
  position: relative;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 5px;
  border-right: 0;
}

.mapSearch__numberCombobox {
  position: relative;
  display: block;
}

/* 保留數字欄位的輔助閱讀名稱，不佔用工具列視覺空間。 */
.mapSearch__numberCombobox > .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;
}

.mapSearch__numberField {
  display: flex;
  align-items: center;
  width: 130px;
  height: 32px;
  padding-left: 7px;
  color: #4e4436;
  background: rgb(255 255 255 / 68%);
  border: 1px solid #e3dbcf;
  border-radius: 4px;
}

.mapSearch__numberField:focus-within {
  border-color: #a98751;
  box-shadow: 0 0 0 2px rgb(169 135 81 / 13%);
}

.mapSearch__numberField input {
  width: 100%;
  min-width: 0;
  height: 30px;
  padding: 0;
  color: #4e4436;
  font: 700 14px / 1 Arial, "Noto Sans TC", sans-serif;
  text-align: center;
  background: transparent;
  border: 0;
  outline: 0;
}

.mapSearch__numberField input::placeholder {
  color: #aaa197;
  opacity: 1;
}

.mapSearch__numberField input::-webkit-inner-spin-button,
.mapSearch__numberField input::-webkit-outer-spin-button {
  margin: 0;
  appearance: none;
}

.mapSearch__numberField > span {
  padding-right: 1px;
  color: #81776a;
  font-size: 12px;
  font-weight: 700;
}

.mapSearch__numberField > .mapSearch__numberPrefix {
  flex: 0 0 auto;
  padding-right: 5px;
  color: #7d7060;
  font-size: 13px;
  font-weight: 700;
}

.mapSearch__numberField button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 21px;
  height: 30px;
  padding: 0;
  color: #847866;
  cursor: pointer;
  background: transparent;
  border: 0;
}

.mapSearch__numberField button .material-symbols-outlined {
  font-size: 19px;
  line-height: 1;
}

.mapSearch__rentRangeDash {
  color: #978b7c;
  font-size: 15px;
  font-weight: 700;
}

.mapSearch__numberOptions {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 720;
  display: none;
  width: 132px;
  max-height: 204px;
  overflow-y: auto;
  padding: 5px;
  background: #fff;
  border: 1px solid #ddd3c5;
  border-radius: 5px;
  box-shadow: 0 9px 22px rgb(67 51 29 / 18%);
}

.mapSearch__numberCombobox.is-open .mapSearch__numberOptions {
  display: grid;
}

.mapSearch__numberOption {
  min-height: 30px;
  padding: 0 8px;
  color: #5f5547;
  font: 700 14px / 1 "Noto Sans TC", sans-serif;
  text-align: left;
  cursor: pointer;
  background: transparent;
  border: 0;
  border-radius: 3px;
}

.mapSearch__numberOption:hover,
.mapSearch__numberOption:focus-visible {
  color: #8d642e;
  background: #f7f0e3;
  outline: 0;
}

.mapSearch__numberEmpty {
  padding: 7px 8px;
  color: #988e82;
  font-size: 13px;
  white-space: nowrap;
}

/* 進階篩選展開時改以分段直式掃讀，保留原工具列的同一組 checkbox。 */
.mapSearch.is-advanced-filters .mapSearch__toolbar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  width: min(760px, calc(100% - 48px));
  padding: 10px 16px;
}

.mapSearch.is-advanced-filters .mapSearch__toolbar > .mapSearch__filter,
.mapSearch.is-advanced-filters .mapSearch__toolbar > .mapSearch__checkGroup,
.mapSearch.is-advanced-filters .mapSearch__toolbar > .mapSearch__rentRange {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 0;
  padding: 12px 0;
  border-right: 0;
  border-bottom: 1px solid #e6dfd0;
}

.mapSearch.is-advanced-filters .mapSearch__toolbar > .mapSearch__filter > .mapSearch__advancedLegend,
.mapSearch.is-advanced-filters .mapSearch__toolbar > .mapSearch__checkGroup > .mapSearch__advancedLegend,
.mapSearch.is-advanced-filters .mapSearch__toolbar > .mapSearch__rentRange > .mapSearch__advancedLegend {
  display: block;
  flex: 0 0 100%;
  position: static;
  float: none;
  margin: 0 0 2px;
  color: #7d7060;
  font-size: 14px;
  font-weight: 700;
}

.mapSearch.is-advanced-filters .mapSearch__toolbar > .mapSearch__filter:not(.mapSearch__filter--selectOnly) > span:not(.mapSearch__advancedLegend) {
  flex: 0 0 100%;
  position: static;
  color: #7d7060;
  font-size: 14px;
}

.mapSearch.is-advanced-filters .mapSearch__check.mapSearch__advancedOnly {
  display: inline-flex;
}

.mapSearch__filter select {
  width: max-content;
  height: 34px;
  padding: 0 14px 0 12px;
  margin-top: 0;
  margin-bottom: 0;
  color: #4e4436;
  font-size: 15px;
  font-weight: 700;
  background-color: #f2f1f0;
  background-position: right center;
  background-size: 13px;
  border: 0;
  border-bottom: 0;
  border-right: 7px solid #f2f1f0;
  border-radius: 5px;
}

/* 縣市為地圖主篩選，選取值提高層級，和其他條件清楚區隔。 */
.mapSearch__filter select[data-map-filter="city"] {
  font-size: 18px;
}

.mapSearch__filter--district select {
  min-width: 84px;
}

.mapSearch__result {
  display: grid;
  place-items: center;
  min-width: 0;
  padding: 0 8px;
  color: #c65d4e;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.mapSearch__iconButton,
.mapSearch__close {
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  padding: 0;
  color: #755b2c;
  cursor: pointer;
  background: #f6f1e7;
  border: 1px solid #dfd1b8;
  border-radius: 5px;
}

.mapSearch__iconButton:hover,
.mapSearch__close:hover {
  color: #fff;
  background: #9d7131;
  border-color: #9d7131;
}

.mapSearch__iconButton .material-symbols-outlined,
.mapSearch__close .material-symbols-outlined {
  font-size: 20px;
}

.mapSearch__panel {
  position: absolute;
  top: 178px;
  right: 32px;
  bottom: 32px;
  z-index: 500;
  width: min(390px, calc(100% - 64px));
  overflow: auto;
  pointer-events: none;
}

.mapSearch__listPanel,
.mapSearch__detailPanel {
  position: absolute;
  top: 157px;
  bottom: 25px;
  z-index: 500;
  overflow: auto;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  border-radius: 10px;
  transition: transform 280ms cubic-bezier(0.22, 0.61, 0.36, 1), opacity 220ms ease, visibility 0s linear 280ms;
}

.mapSearch__listPanel {
  right: 25px;
  width: min(360px, calc(100% - 50px));
  transform: translateX(calc(100% + 32px));
}

.mapSearch__detailPanel {
  left: 25px;
  width: min(400px, calc(100% - 50px));
  transform: translateX(calc(-100% - 32px));
  transition: width 320ms ease, filter 320ms ease, transform 280ms cubic-bezier(0.22, 0.61, 0.36, 1), opacity 220ms ease, visibility 0s linear 280ms;
}

.mapSearch__detailPanel.is-expanded {
  top: 80px;
  right: 405px;
  z-index: 1000;
  width: auto;
  overflow: hidden;
}

/* 完整房源展開時，右側同路段清單維持在遮罩上方供直接切換房源。 */
.mapSearch.is-detail-expanded .mapSearch__listPanel {
  z-index: 900;
}

.mapSearch__detailPanel:not(.is-expanded) {
  overflow: hidden;
}

.mapSearch__panel.is-open,
.mapSearch__listPanel.is-open,
.mapSearch__detailPanel.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  pointer-events: auto;
  transition-delay: 0s;
}

.mapSearch__listPanel.is-closing,
.mapSearch__detailPanel.is-closing {
  visibility: visible;
  pointer-events: none;
}

.mapSearch__panelInner {
  display: none;
  min-height: 100%;
  padding: 24px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(137, 111, 66, 0.2);
  border-radius: 8px;
  box-shadow: 0 12px 38px rgba(104, 83, 45, 0.16);
}

.is-open .mapSearch__panelInner,
.is-closing .mapSearch__panelInner {
  display: block;
}

.mapSearch__listPanel .mapSearch__panelInner,
.mapSearch__detailPanel .mapSearch__panelInner {
  min-height: 100%;
  padding: 0;
  background: #fff;
  border: 1px solid #ebe2d4;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(104, 83, 45, 0.16);
}

.mapSearch__panelTop {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  border-bottom: 1px solid #e5ded0;
}

.mapSearch__listPanel .mapSearch__panelTop {
  align-items: center;
  height: 65px;
  padding: 10px 16px;
  box-sizing: border-box;
}

.mapSearch__eyebrow {
  margin: 0 0 8px;
  color: #bd5b4f;
  font-size: 12px;
  font-weight: 800;
}

.mapSearch__title {
  margin: 0;
  color: #4e4436;
  font-size: 22px;
  line-height: 1.4;
}

.mapSearch__roadTitle {
  margin: 0;
  color: #a07737;
  font-size: 19px;
  line-height: 1.45;
}

.mapSearch__close {
  flex-basis: 34px;
  width: 34px;
  height: 34px;
}

.mapSearch__summary {
  margin: 20px 0;
  color: #6d6254;
  font-size: 14px;
  line-height: 1.8;
}

.mapSearch__list {
  margin: 0;
  padding: 0;
}

.mapSearch__listItem {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  width: 100%;
  padding: 17px 20px;
  color: inherit;
  text-align: left;
  cursor: pointer;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #e8e1d5;
}

.mapSearch__listItem.is-active {
  background: #f7f3ed;
  box-shadow: inset 3px 0 0 #b18a4b;
}

.mapSearch__listItem:hover .mapSearch__listTitle {
  color: #bd5b4f;
}

.mapSearch__listTitle {
  display: block;
  color: #4e4436;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.5;
}

.mapSearch__listContent {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.mapSearch__listTags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.mapSearch__listTags > span:not(.mapSearch__identityTag) {
  padding: 2px 5px;
  color: #7a6e60;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  background: #f6f2eb;
  border-radius: 3px;
}

.mapSearch__listFacts {
  display: flex;
  flex-wrap: wrap;
  color: #665c50;
  font-size: 12px;
  line-height: 1.45;
}

.mapSearch__listFacts > span + span::before {
  margin: 0 6px;
  color: #c7bcae;
  content: '·';
}

.mapSearch__listLocation {
  display: flex;
  align-items: center;
  gap: 3px;
  color: #85796b;
  font-size: 12px;
  line-height: 1.45;
}

.mapSearch__listLocation .material-symbols-outlined {
  color: #a77b39;
  font-size: 15px;
}

.mapSearch__listMeta,
.mapSearch__detailMeta {
  display: block;
  margin-top: 5px;
  color: #7a6e60;
  font-size: 13px;
  line-height: 1.6;
}

.mapSearch__identityTag {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  margin: 0 6px 0 0;
  padding: 1px 6px;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  vertical-align: 1px;
  border-radius: 3px;
}

.mapSearch__identityTag--social {
  background: #9cba27;
}

.mapSearch__identityTag--professional {
  background: #e9b13b;
}

.mapSearch__identityTag--independent {
  background: #51b89b;
}

.mapSearch__rent {
  display: flex;
  align-self: center;
  align-items: baseline;
  gap: 3px;
  color: #bd5b4f;
  white-space: nowrap;
}

.mapSearch__rent strong {
  font-size: 15px;
  font-weight: 800;
}

.mapSearch__rent small {
  color: #9a8976;
  font-size: 11px;
  font-weight: 700;
}

.mapSearch__detail {
  display: grid;
  gap: 18px;
  margin-top: 22px;
}

.mapSearch__slider {
  position: relative;
  margin: 20px 0 4px;
  overflow: hidden;
  background: #e9eeee;
  aspect-ratio: 16 / 10;
}

.mapSearch__slides,
.mapSearch__slide {
  width: 100%;
  height: 100%;
}

.mapSearch__slide {
  display: none;
  object-fit: cover;
}

.mapSearch__slide.is-active {
  display: block;
}

.mapSearch__sliderButton {
  position: absolute;
  top: 50%;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  color: #fff;
  cursor: pointer;
  background: rgba(36, 54, 63, 0.62);
  border: 0;
  border-radius: 50%;
  transform: translateY(-50%);
}

.mapSearch__sliderButton:hover {
  background: rgba(36, 54, 63, 0.9);
}

.mapSearch__sliderButton .material-symbols-outlined {
  font-size: 22px;
}

.mapSearch__sliderButton--prev {
  left: 10px;
}

.mapSearch__sliderButton--next {
  right: 10px;
}

.mapSearch__sliderDots {
  position: absolute;
  right: 0;
  bottom: 10px;
  left: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
}

.mapSearch__sliderDot {
  width: 7px;
  height: 7px;
  padding: 0;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.68);
  border: 0;
  border-radius: 50%;
}

.mapSearch__sliderDot.is-active {
  background: #fff;
  box-shadow: 0 0 0 1px rgba(36, 54, 63, 0.45);
}

.mapSearch__detailBlock {
  padding-bottom: 18px;
  border-bottom: 1px solid #e5eaeb;
}

.mapSearch__detailLabel {
  display: block;
  margin-bottom: 8px;
  color: #7a6e60;
  font-size: 12px;
  font-weight: 800;
}

.mapSearch__detailValue {
  color: #4e4436;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.7;
}

.mapSearch__back {
  width: 100%;
  margin-top: 22px;
  padding: 12px;
  color: #755b2c;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  background: #f7f2e8;
  border: 1px solid #dfd2ba;
  border-radius: 5px;
}

.mapSearch__back:hover {
  color: #fff;
  background: #9d7131;
  border-color: #9d7131;
}

.mapSearch__snapshotPhoto {
  position: relative;
  margin: 20px 0;
  overflow: hidden;
  background: #e9e4d9;
  aspect-ratio: 16 / 10;
}

.mapSearch__roomSnapshot {
  position: relative;
  height: 100%;
  min-height: 0;
  padding-top: 97px !important;
}

.mapSearch__roomSnapshot .mapSearch__panelTop {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: 2;
  background: #fff;
}

.mapSearch__snapshotContent {
  height: 100%;
  overflow-y: auto;
}

.mapSearch__snapshotContent .mapSearch__snapshotPhoto {
  margin-top: 0;
}

.mapSearch__roomSnapshot .mapSearch__snapshotPhoto,
.mapSearch__roomSnapshot .mapSearch__snapshotPrice,
.mapSearch__roomSnapshot .mapSearch__snapshotFacts,
.mapSearch__roomSnapshot .mapSearch__tagList,
.mapSearch__roomSnapshot .mapSearch__snapshotAmenities {
  margin-right: 20px;
  margin-left: 20px;
}

.mapSearch__snapshotPhoto img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mapSearch__snapshotPhoto span {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 7px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  background: rgb(78 68 54 / 76%);
  border-radius: 4px;
}

.mapSearch__snapshotPhoto .material-symbols-outlined {
  font-size: 16px;
}

.mapSearch__snapshotPrice {
  display: grid;
  gap: 5px;
  padding-bottom: 18px;
  border-bottom: 1px solid #e8e1d5;
}

.mapSearch__snapshotPrice span,
.mapSearch__snapshotPrice small {
  color: #7a6e60;
  font-size: 12px;
  font-weight: 800;
}

.mapSearch__snapshotPrice strong {
  color: #4e4436;
  font-size: 17px;
  letter-spacing: 0;
}

.mapSearch__snapshotFacts {
  display: grid;
  gap: 9px;
  margin: 18px 0;
  color: #4e4436;
  font-size: 14px;
  font-weight: 700;
}

.mapSearch__tagList {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mapSearch__tagList span {
  padding: 5px 7px;
  color: #755b2c;
  font-size: 12px;
  font-weight: 800;
  background: #f4ede0;
  border: 1px solid #e1d1b4;
  border-radius: 4px;
}

.mapSearch__snapshotAmenities {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #e8e1d5;
}

.mapSearch__snapshotAmenities > span {
  color: #887b6a;
  font-size: 12px;
  font-weight: 800;
}

.mapSearch__snapshotAmenities > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mapSearch__snapshotAmenities i {
  padding: 5px 7px;
  color: #5e5447;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  background: #f7f2e8;
  border: 1px solid #e1d6c4;
  border-radius: 4px;
}

.mapSearch__detailAction,
.mapSearch__appointment,
.mapSearch__collapse {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  background: #9d7131;
  border: 1px solid #876029;
  border-radius: 5px;
}

.mapSearch__detailAction {
  width: 100%;
  margin-top: 22px;
}

.mapSearch__roomSnapshot .mapSearch__detailAction {
  width: calc(100% - 40px);
  margin-right: 20px;
  margin-left: 20px;
}

.mapSearch__detailAction:hover,
.mapSearch__appointment:hover {
  background: #876029;
}

.mapSearch__detailAction .material-symbols-outlined,
.mapSearch__appointment .material-symbols-outlined {
  font-size: 19px;
}

.mapSearch__roomFull {
  position: relative;
  height: 100%;
  min-height: 0;
  padding-top: 65px !important;
  opacity: 0;
  transform: translateX(-18px);
  animation: mapSearchDetailIn 280ms 90ms ease forwards;
}

.mapSearch__fullContent {
  height: 100%;
  padding: 0 28px 28px;
  overflow-y: auto;
  width: 100%;
  box-sizing: border-box;
}

.mapSearch__fullContentInner {
  width: min(1040px, 100%);
  margin: 0 auto;
}

.mapSearch__fullHeader {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  height: 65px;
  padding: 10px 16px;
  box-sizing: border-box;
  background: #fff;
  border-bottom: 1px solid #e5ded0;
}

.mapSearch__fullHeader .mapSearch__eyebrow {
  display: none;
}

.mapSearch__fullHeader .mapSearch__title {
  overflow: hidden;
  font-size: 18px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mapSearch__collapse {
  min-height: 34px;
  padding: 0 10px;
  color: #755b2c;
  background: #f7f2e8;
  border-color: #dfd2ba;
}

.mapSearch__collapse:hover {
  color: #fff;
  background: #9d7131;
  border-color: #9d7131;
}

.mapSearch__collapse .material-symbols-outlined {
  font-size: 18px;
}

.mapSearch__fullHero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(270px, 0.4fr);
  gap: 22px;
  margin: 22px 0 26px;
}

.mapSearch__fullGallery {
  min-width: 0;
}

.mapSearch__roomSwiper {
  overflow: hidden;
  background: #e9e4d9;
  aspect-ratio: 16 / 10;
}

.mapSearch__roomSwiper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mapSearch__roomSwiper .swiper-button-next,
.mapSearch__roomSwiper .swiper-button-prev {
  width: 36px;
  height: 36px;
  color: #fff;
  background: rgb(78 68 54 / 72%);
  border-radius: 50%;
}

.mapSearch__roomSwiper .swiper-button-next::after,
.mapSearch__roomSwiper .swiper-button-prev::after {
  font-size: 17px;
  font-weight: 800;
}

.mapSearch__roomSwiper .swiper-pagination-bullet {
  width: 7px;
  height: 7px;
  background: #fff;
  opacity: 0.7;
}

.mapSearch__roomSwiper .swiper-pagination-bullet-active {
  width: 20px;
  border-radius: 8px;
  opacity: 1;
}

.mapSearch__fullPrice {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin: 0;
  padding: 16px 20px;
  background: rgb(250 247 240 / 84%);
  border: 1px solid #e3d7c4;
}

.mapSearch__fullPrice div:first-child {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 5px;
}

.mapSearch__fullPrice div:first-child .material-symbols-outlined {
  color: #9d7131;
  font-size: 20px;
}

.mapSearch__fullPrice div:first-child span,
.mapSearch__fullPrice div:first-child small,
.mapSearch__fullPrice p {
  margin: 0;
  color: #7a6e60;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

.mapSearch__fullPrice strong {
  color: #9b5b48;
  font-size: 25px;
  letter-spacing: 0;
}

.mapSearch__appointment {
  width: 100%;
  margin-top: auto;
  margin-left: 0;
}

.mapSearch__quickFacts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  gap: 10px;
  padding: 14px 0;
  border-top: 1px solid #e5ded0;
  border-bottom: 1px solid #e5ded0;
}

.mapSearch__quickFacts div {
  display: grid;
  gap: 3px;
}

.mapSearch__quickFacts span {
  color: #887b6a;
  font-size: 12px;
  font-weight: 700;
}

.mapSearch__quickFacts strong {
  color: #4e4436;
  font-size: 14px;
  line-height: 1.45;
}

.mapSearch__fullGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.mapSearch__fullSection {
  padding: 20px;
  background: #fff;
  border: 1px solid #e7dece;
  box-shadow: 2px 3px 16px rgba(104, 83, 45, 0.15);
}

.mapSearch__fullSection--wide {
  grid-column: 1 / -1;
}

.mapSearch__fullSection--basic {
  padding-bottom: 24px;
}

.mapSearch__basicFactGrid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px 18px;
}

.mapSearch__basicFact {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.mapSearch__basicFactIcon.material-symbols-outlined {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  color: #9d7131;
  font-size: 21px;
  line-height: 40px;
  text-align: center;
  vertical-align: middle;
  background: #f8f3e9;
  border-radius: 50%;
}

.mapSearch__basicFact div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.mapSearch__basicFact div > span,
.mapSearch__basicSupplement span {
  color: #887b6a;
  font-size: 13px;
  font-weight: 700;
}

.mapSearch__basicFact strong,
.mapSearch__basicSupplement strong {
  color: #4e4436;
  font-size: 14px;
  line-height: 1.45;
}

.mapSearch__basicSupplement {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid #e5ded0;
}

.mapSearch__basicSupplement > div {
  display: grid;
  gap: 5px;
}

.mapSearch__basicDescription {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 8px;
  margin-top: 20px;
  padding-top: 18px;
  color: #5e5447;
  border-top: 1px solid #e5ded0;
}

.mapSearch__basicDescription > .material-symbols-outlined {
  color: #bfb6a6;
  font-size: 28px;
}

.mapSearch__basicDescription p {
  margin: 0;
  font-size: 14px;
  line-height: 1.8;
}

.mapSearch__fullSection h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  color: #755b2c;
  font-size: 20px;
  line-height: 1.4;
}

.mapSearch__fullSection h2 .material-symbols-outlined {
  color: #bfb6a6;
  font-size: 34px;
}

.mapSearch__factGrid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px 10px;
  margin: 0;
}

.mapSearch__factGrid div {
  min-width: 0;
}

.mapSearch__factGrid dt {
  margin-bottom: 5px;
  color: #887b6a;
  font-size: 15px;
  font-weight: 700;
}

.mapSearch__factGrid dd {
  margin: 0;
  color: #4e4436;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.45;
}

.mapSearch__detailRows {
  display: grid;
  gap: 14px;
}

.mapSearch__detailRows div {
  display: grid;
  gap: 5px;
}

.mapSearch__detailRows span,
.mapSearch__chipRow > span {
  color: #887b6a;
  font-size: 15px;
  font-weight: 700;
}

.mapSearch__detailRows strong {
  color: #363636;
  font-size: 15px;
  line-height: 1.65;
}

.mapSearch__chipRow {
  display: grid;
  gap: 7px;
}

.mapSearch__chipRow + .mapSearch__chipRow {
  margin-top: 14px;
}

.mapSearch__chipRow > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mapSearch__chipRow i {
  padding: 5px 7px;
  color: #5e5447;
  font-size: 14px;
  font-style: normal;
  font-weight: 700;
  background: #f7f2e8;
  border: 1px solid #e1d6c4;
  border-radius: 4px;
}

.mapSearch__amenityGroup + .mapSearch__amenityGroup {
  margin-top: 22px;
}

.mapSearch__amenityGroup h3 {
  margin: 0 0 12px;
  color: #887b6a;
  font-size: 15px;
  font-weight: 800;
}

.mapSearch__amenityGroup ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mapSearch__amenity {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 9px 12px;
  color: #c8c0b3;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  background: #faf9f6;
  border-radius: 5px;
}

.mapSearch__amenity .material-symbols-outlined {
  font-size: 20px;
  font-weight: 300;
}

.mapSearch__amenity.is-provided {
  color: #4e4436;
  background: #f8f5ef;
}

.mapSearch__amenity.is-provided .material-symbols-outlined {
  color: #9d7131;
  font-variation-settings: "FILL" 0, "wght" 500, "GRAD" 0, "opsz" 22;
}

.mapSearch__ruleList {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 18px;
}

.mapSearch__ruleList span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #4e4436;
  font-size: 14px;
  font-weight: 700;
}

.mapSearch__ruleList .material-symbols-outlined {
  color: #4d9b61;
  font-size: 17px;
}

.mapSearch__description {
  margin: 0;
  color: #5e5447;
  font-size: 14px;
  line-height: 1.9;
}

.mapSearch__locationPreview {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 16px;
  padding: 12px;
  color: #755b2c;
  font-size: 14px;
  background: #f8f3e9;
  border: 1px solid #e4d7c3;
}

.mapSearch__locationPreview .material-symbols-outlined {
  font-size: 20px;
}

@keyframes mapSearchDetailIn {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes mapSearchMarkerFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.94);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.mapSearch__marker {
  position: relative;
  display: grid;
  min-width: 110px;
  min-height: 0;
  padding: 4px 9px;
  color: #fff;
  font: 700 14px/1.25 Arial, "Noto Sans TC", sans-serif;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  background: #b6804f;
  border: 2px solid #fff;
  border-radius: 6px;
  box-shadow: 0 3px 12px rgba(50, 58, 60, 0.26);
}

.mapSearch__marker--fadein,
.mapSearch__aggregateMarker--fadein {
  animation: mapSearchMarkerFadeIn 240ms ease both;
}

/* 鏡頭內但非目前 city 的路段維持灰階，點擊後才切換縣市並使用正常色彩。 */
.mapSearch__marker--external {
  color: #fff;
  background: #88908d;
  border-color: #f8f8f6;
  box-shadow: 0 3px 12px rgba(45, 52, 49, 0.24);
}

.mapSearch__marker--external::after {
  border-top-color: #88908d;
}

.mapSearch__marker--external .mapSearch__markerCount {
  color: #68716d;
  border-color: #88908d;
}

.mapSearch__marker::after {
  position: absolute;
  bottom: -12px;
  left: 50%;
  width: 0;
  height: 0;
  content: "";
  border: 6px solid transparent;
  border-top-color: #b6804f;
  transform: translateX(-50%);
}

.mapSearch__markerPrice,
.mapSearch__markerRoad {
  display: block;
}

.mapSearch__markerRoad {
  font-size: 13px;
  font-weight: 400;
  opacity: 0.6;
}

.mapSearch__marker--tenant {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  min-height: 42px;
  height: 42px;
  padding: 0;
  color: #0a3857;
  font: 900 18px/1 Arial, "Noto Sans TC", sans-serif;
  letter-spacing: 0;
  background: #ffd85d;
  border: 2px solid #f3c943;
  border-radius: 7px;
  box-shadow: 0 2px 5px rgba(15, 38, 54, 0.18);
}

.mapSearch__marker--tenant:hover {
  filter: brightness(1.03);
  box-shadow: 0 4px 10px rgba(15, 38, 54, 0.22);
}

.mapSearch__marker--tenant::after {
  position: absolute;
  right: 18px;
  bottom: -8px;
  width: 14px;
  height: 14px;
  content: "";
  background: #ffd85d;
  border-right: 2px solid #f3c943;
  border-bottom: 2px solid #f3c943;
  transform: rotate(45deg);
  transform-origin: center;
  z-index: -1;
}

.mapSearch__markerName {
  display: grid;
  place-items: center;
  align-self: stretch;
  min-width: 58px;
  padding: 0 12px;
  color: #0a3857;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 5px 0 0 5px;
}

.mapSearch__markerTotal {
  display: grid;
  place-items: center;
  min-width: 64px;
  padding: 0 12px;
  color: #0a3857;
}

.mapSearch__marker--social {
  background: #5b9a6c;
}

.mapSearch__marker--social::after {
  border-top-color: #5b9a6c;
}

/* 路段色彩規則：一般宅棕色、含社宅綠色、含專業代管橘色；外縣市一律由灰色覆蓋。 */
.mapSearch__marker--professional {
  background: #eba91e;
}

.mapSearch__marker--professional::after {
  border-top-color: #eba91e;
}

.mapSearch__markerCount {
  position: absolute;
  top: -12px;
  left: -10px;
  display: grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 3px 4px;
  color: #c65d4e;
  font-size: 13px;
  line-height: 1;
  background: #fff;
  border: 1px solid #c65d4e;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(50, 58, 60, 0.18);
}

.mapSearch__marker--social .mapSearch__markerCount {
  color: #5b9a6c;
  border-color: #5b9a6c;
}

.mapSearch__marker--professional .mapSearch__markerCount {
  color: #b57900;
  border-color: #eba91e;
}

/* 外縣市優先於所有路段色彩，尚未切換 city 前一律使用灰色。 */
.mapSearch__marker.mapSearch__marker--external .mapSearch__markerCount {
  color: #68716d;
  border-color: #88908d;
}

/* 外縣市 marker 的下方箭頭必須與灰色本體一致。 */
.mapSearch__marker.mapSearch__marker--external::after {
  border-top-color: #88908d !important;
}

.mapSearch__aggregateMarker {
  display: grid;
  place-content: center;
  width: 94px;
  height: 94px;
  padding: 10px;
  color: #755b2c;
  font: 700 14px/1.3 Arial, "Noto Sans TC", sans-serif;
  text-align: center;
  cursor: pointer;
  background: rgb(255 255 255 / 68%);
  border: 1px solid rgb(177 138 75 / 76%);
  border-radius: 50%;
  box-shadow: 0 5px 17px rgb(90 69 31 / 20%);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.mapSearch__aggregateMarker:hover {
  color: #62491f;
  background: rgb(255 255 255 / 82%);
  border-color: #aa8240;
  box-shadow: 0 7px 20px rgb(90 69 31 / 26%);
}

.mapSearch__aggregateMarker--external {
  color: #5e6662;
  background: rgb(243 245 242 / 82%);
  border-color: #9ba39f;
  box-shadow: 0 5px 17px rgb(55 64 59 / 18%);
}

.mapSearch__aggregateMarker--external .mapSearch__aggregateTotal {
  color: #69736d;
}

.mapSearch__aggregateMarker--taiwan {
  width: 132px;
  height: 132px;
  font-size: 16px;
}

.mapSearch__aggregateMarker--city {
  width: 108px;
  height: 108px;
  font-size: 15px;
}

.mapSearch__aggregateName,
.mapSearch__aggregateTotal {
  display: block;
}

.mapSearch__aggregateTotal {
  margin-top: 3px;
  color: #9d7131;
  font-size: 16px;
}

.mapSearch__aggregateMarker--taiwan .mapSearch__aggregateTotal {
  font-size: 20px;
}

.leaflet-control-zoom a {
  color: #755b2c;
  background: #fffdf8;
  border-bottom-color: #e1d5bf;
}

.mapSearch__overlayTools {
  position: fixed;
  top: 140px;
  right: 24px;
  z-index: 500;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.mapSearch__overlayTool {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  color: #755b2c;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(137, 111, 66, 0.28);
  border-radius: 6px;
  box-shadow: 0 6px 20px rgba(104, 83, 45, 0.16);
}

.mapSearch__overlayTool::after {
  position: absolute;
  top: 50%;
  right: calc(100% + 9px);
  z-index: 1;
  padding: 6px 8px;
  color: #fff;
  font: 700 12px/1.2 Arial, "Noto Sans TC", sans-serif;
  white-space: nowrap;
  pointer-events: none;
  content: attr(data-tooltip);
  visibility: hidden;
  background: rgba(63, 54, 42, 0.92);
  border-radius: 4px;
  opacity: 0;
  transform: translateY(-50%) translateX(4px);
  transition: opacity 150ms ease, transform 150ms ease, visibility 150ms ease;
}

.mapSearch__overlayTool:hover::after,
.mapSearch__overlayTool:focus-visible::after {
  visibility: visible;
  opacity: 1;
  transform: translateY(-50%);
}

.mapSearch__overlayTool:hover,
.mapSearch__overlayTool.is-active {
  color: #fff;
  background: #9d7131;
  border-color: #876029;
}

.mapSearch__rentMedianButton.is-loading {
  cursor: wait;
  opacity: 0.72;
}

.mapSearch__rentMedianButton .material-symbols-outlined {
  font-size: 21px;
}

.mapSearch__zoomControl {
  display: grid;
  grid-template-rows: repeat(3, 40px);
  overflow: hidden;
  background: #fff;
  border: 1px solid #d9d0c0;
  border-radius: 5px;
  box-shadow: 0 4px 14px rgba(76, 57, 29, 0.2);
}

.mapSearch__zoomControl.leaflet-bar a,
.mapSearch__zoomButton,
.mapSearch__zoomValue {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  color: #7c5c2d;
  font: 800 14px/1 Arial, "Noto Sans TC", sans-serif;
  text-align: center;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.mapSearch__zoomButton {
  cursor: pointer;
}

.mapSearch__zoomButton + .mapSearch__zoomValue,
.mapSearch__zoomValue + .mapSearch__zoomButton {
  border-top: 1px solid #e1d5bf;
}

.mapSearch__zoomButton:hover {
  color: #fff;
  background: #9d7131;
}

.mapSearch__zoomButton .material-symbols-outlined {
  font-size: 20px;
}

.mapSearch__rentMedianLabel {
  color: rgb(38 57 43 / 62%);
  font: 800 19px/1.14 Arial, "Noto Sans TC", sans-serif;
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
  background: transparent;
  border: 0;
  box-shadow: none;
  text-shadow:
    -1px -1px 0 rgb(255 255 255 / 76%),
    1px -1px 0 rgb(255 255 255 / 76%),
    -1px 1px 0 rgb(255 255 255 / 76%),
    1px 1px 0 rgb(255 255 255 / 76%),
    0 1px 2px rgb(50 65 52 / 24%);
}

.mapSearch__rentMedianLabel::before {
  display: none;
}

.mapSearch__rentMedianLabel span,
.mapSearch__rentMedianLabel strong {
  display: block;
}

.mapSearch__rentMedianLabel strong {
  font-size: 19px;
}

.mapSearch__rentMedianArea {
  font-size: 19px;
}

.mapSearch.is-rent-median-labels-hidden .mapSearch__rentMedianLabel {
  display: none;
}

/* 1240px 以下切換為手機導覽；其毛玻璃延伸至 122px，工具列必須排在其下方且不可蓋住導覽。 */
@media screen and (max-width: 1240px) {
  .mapSearch__toolbar,
  .mapSearch--listView .mapSearch__toolbar {
    top: 130px;
    z-index: 1000;
  }
}

@media screen and (max-width: 760px) {
  .mapSearch__toolbar {
    z-index: 1100;
  }

  .mapSearch {
    min-height: 520px;
  }

  .mapSearch__toolbar {
    left: 50%;
    display: grid;
    grid-template-columns: 1fr 40px 40px;
    gap: 6px;
    width: calc(100% - 24px);
    padding: 6px;
    transform: translateX(-50%);
  }

  .mapSearch__modeSwitch {
    top: auto;
    right: auto;
    bottom: 16px;
    left: 12px;
    z-index: 710;
  }

  .mapSearch--listView .mapSearch__modeSwitch {
    position: sticky;
    right: auto;
    bottom: auto;
    left: 12px;
    width: fit-content;
    margin: 12px 0 0;
  }

  .mapSearch--listView .mapSearch__toolbar {
    top: 130px;
  }

  .mapSearch--listView .mapSearch__simpleList {
    padding: 18px 12px 36px;
  }

  .mapSearch--listView .mapSearch__simpleList header {
    display: block;
  }

  .mapSearch__simpleListGrid {
    grid-template-columns: 1fr;
    margin-top: 14px;
  }

  .mapSearch__simpleRoom {
    grid-template-columns: 112px minmax(0, 1fr);
    align-items: start;
    gap: 12px;
    min-height: 0;
    padding: 14px 0;
  }

  .mapSearch__simpleRoomPhoto {
    width: 112px;
    height: 88px;
  }

  .mapSearch__simpleRoom > strong {
    grid-column: 2;
    justify-self: start;
    margin-top: 4px;
    font-size: 18px;
  }

  .mapSearch__simpleRoom h2 {
    margin-top: 5px;
    font-size: 16px;
  }

  .mapSearch__simpleRoomHighlight {
    display: none;
  }

  .mapSearch__filter {
    grid-column: 1 / -1;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 7px;
    padding: 3px 8px;
    border-right: 0;
    border-bottom: 1px solid #e6dfd0;
  }

  .mapSearch__filter > span {
    position: static;
    font-size: 10px;
  }

  .mapSearch__filter select {
    height: 30px;
    margin: 0;
    font-size: 12px;
  }

  .mapSearch__checkGroup {
    grid-column: 1 / -1;
    flex-wrap: wrap;
    gap: 4px;
    padding: 5px 8px;
    border-right: 0;
    border-bottom: 1px solid #e6dfd0;
  }

  .mapSearch__checkGroup > .mapSearch__advancedLegend,
  .mapSearch__rentRange > .mapSearch__advancedLegend {
    position: static;
    font-size: 10px;
  }

  .mapSearch__checkGroup legend {
    margin-right: 3px;
  }

  .mapSearch__check {
    min-height: 27px;
    padding: 0 5px;
    font-size: 12px;
  }

  .mapSearch__result {
    grid-column: 1;
    grid-row: auto;
    min-height: 40px;
  }

  .mapSearch__iconButton {
    grid-row: auto;
  }

  .mapSearch__panel {
    top: auto;
    right: 12px;
    bottom: 12px;
    left: 12px;
    width: auto;
    max-height: min(48dvh, 390px);
  }

  .mapSearch__listPanel,
  .mapSearch__detailPanel {
    top: auto;
    right: 12px;
    bottom: 12px;
    left: 12px;
    width: auto;
    max-height: min(48dvh, 390px);
  }

  .mapSearch__detailPanel {
    z-index: 501;
  }

  .mapSearch__detailPanel.is-expanded {
    right: 12px;
    width: auto;
    max-height: calc(100dvh - 110px);
  }

  .mapSearch__roomFull {
    padding-top: 65px !important;
  }

  .mapSearch__fullHeader {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px;
    padding: 10px 12px;
  }

  .mapSearch__fullHeader > div {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
  }

  .mapSearch__fullContent {
    padding: 0 18px 18px;
  }

  .mapSearch__fullHero {
    grid-template-columns: 1fr;
    gap: 16px;
    margin: 18px 0;
  }

  .mapSearch__fullHeader .mapSearch__collapse {
    grid-column: 1;
    grid-row: 1;
  }

  .mapSearch__fullHeader .mapSearch__close {
    grid-column: 3;
    grid-row: 1;
  }

  .mapSearch__fullGrid {
    grid-template-columns: 1fr;
  }

  .mapSearch__fullPrice {
    display: grid;
    gap: 10px;
  }

  .mapSearch__fullSection--wide {
    grid-column: auto;
  }

  .mapSearch__basicFactGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 12px;
  }

  .mapSearch__basicSupplement {
    grid-template-columns: 1fr;
  }

  .mapSearch__basicFact {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 8px;
  }

  .mapSearch__basicFactIcon.material-symbols-outlined {
    width: 34px;
    height: 34px;
    font-size: 18px;
    line-height: 34px;
  }

  .mapSearch__factGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mapSearch__fullSection,
  .mapSearch__fullPrice {
    padding: 16px;
  }

  .mapSearch__appointment {
    width: 100%;
    margin-left: 0;
  }

  .mapSearch__overlayTools {
    top: 76px;
    right: 12px;
  }

  .mapSearch__overlayTool {
    width: 40px;
    height: 40px;
  }

  .mapSearch__panelInner {
    min-height: 0;
    padding: 18px;
  }

  .mapSearch__listPanel .mapSearch__panelInner,
  .mapSearch__detailPanel .mapSearch__panelInner {
    min-height: 0;
    padding: 0;
  }
}
