/*
 * /map/ 專用樣式。通用排列、定位、尺寸與文字設定優先使用 Bootstrap 5.3 utilities。
 * 單一位置的固定設定寫在標籤；此檔保留品牌配色、地圖標記、互動狀態、
 * 偽元素、動畫與 768px 手機／桌面斷點等無法由通用類別直接取代的規則。
 * [hidden] 必須能覆蓋 d-flex 等工具類別，讓 JS 的 hidden 切換正常運作。
 */
:root {
  --primary: #a52323;
  --ink: #393939;
  --muted: #77736e;
  --line: #e9e3dd;
  --bg: #fcfaf7;
  --sea: #e7f1f8;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: Inter,"Noto Sans TC",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  color: var(--ink);
  background: var(--bg);
}
button,input,select {
  font: inherit;
}
button,a,input,select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  color: inherit;
}
button {
  border: 0;
  background: none;
}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible {
  outline: 3px solid #e7a85e;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
.brand {
  text-decoration: none;
  color: var(--primary);
  font-weight: 850;
  font-size: 25px;
}
main {
  margin-left: 0;
}
header {
  height: 88px;
  padding: 0 35px;
  background: #fff;
}
.header-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .6px;
}
.header-title>span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
  margin-top: 7px;
  letter-spacing: 1px;
}
.header-right {
  display: flex;
}
.text-button {
  color: var(--muted);
  font-size: 12px;
}
.toolbar {
  background: #fff;
  display: flex;
  align-items: center;
  padding: 0 35px 18px;
  gap: 28px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.modes {
  display: flex;
  padding: 5px;
  border-radius: 11px;
  flex-shrink: 0;
}
.modes button {
  padding: 10px 18px;
  font-size: 13px;
  border-radius: 8px;
  white-space: nowrap;
}
.modes button.active {
  background: var(--primary);
  color: #fff;
}
.filters {
  display: flex;
  gap: 10px;
  flex: 1;
}
.search {
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0 12px;
  flex: 1;
  min-width: 120px;
}
.search input {
  border: 0;
  background: transparent;
  width: 100%;
  outline: none;
  font-size: 12px;
  height: 40px;
}
.filter-button {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  min-width: 100px;
  padding: 0 13px;
  font-size: 12px;
  gap: 14px;
}
.filter-button.selected {
  border-color: var(--primary);
  background: #fbefeb;
}
.map-shell {
  flex: 1;
  background: var(--sea);
  min-height: 0;
}
.map-heading {
  top: 24px;
  left: 30px;
  right: 28px;
  z-index: 2;
  pointer-events: none;
}
#breadcrumbs,.range-toolbar {
  pointer-events: auto;
}
#breadcrumbs {
  display: flex;
  align-items: center;
  background: #ffffffed;
  border-radius: 9px;
  padding: 7px 10px;
  box-shadow: 0 2px 10px #39393907;
  font-size: 12px;
}
#breadcrumbs button {
  padding: 5px 8px;
}
#breadcrumbs button:last-child {
  font-weight: 700;
  color: var(--primary);
}
#breadcrumbs span {
  color: #bbb0a5;
}
svg {
  width: 100%;
  height: 100%;
  touch-action: none;
}
.region {
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
  cursor: pointer;
  transition: fill .18s;
}
.region:hover,.region:focus {
  fill: #ead0b6;
  outline: none;
}
.region-label {
  fill: #634f44;
  font-size: 12px;
  text-anchor: middle;
  paint-order: stroke;
  stroke-width: 3px;
  stroke-linejoin: round;
  cursor: pointer;
}
.map-caption {
  position: absolute;
  left: 40px;
  top: 105px;
  pointer-events: none;
  width: 285px;
}
#stepLabel {
  font-size: 10px;
  letter-spacing: 2px;
  color: #a27c57;
  text-transform: uppercase;
}
.map-caption h1 {
  font-size: 29px;
  font-weight: 550;
  line-height: 1.6;
  letter-spacing: 2px;
  margin: 15px 0;
}
.map-caption p {
  font-size: 12px;
  color: #8d7c6d;
  line-height: 1.9;
  white-space: pre-line;
}
.map-tools {
  position: absolute;
  right: 26px;
  bottom: 65px;
  display: grid;
  gap: 1px;
  background: #e9dfd500;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 18px #39393910;
}
/* 沿用 Bootstrap btn 的互動狀態；圖示置中、按鈕尺寸與位置維持原設定。 */
.map-tools button {
  --bs-btn-color: var(--ink);
  --bs-btn-bg: #fff;
  --bs-btn-hover-color: var(--primary);
  --bs-btn-hover-bg: #fbefeb;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: var(--primary);
  width: 43px;
  height: 43px;
  font-size: 22px;
}
/* 工具列有 overflow:hidden，焦點框畫在按鈕內側，避免被裁掉。 */
.map-tools .btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -3px;
}
.legend {
  position: absolute;
  left: 32px;
  bottom: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  color: #8f7e6c;
  background: #ffffffa6;
  padding: 9px 12px;
  border-radius: 6px;
}
.legend i {
  width: 9px;
  height: 9px;
  background: #f1dfc5;
  border: 1px solid #c6a97b;
  border-radius: 2px;
}
.legend span {
  padding: 0 5px;
}
.map-note {
  bottom: 6px;
  right: 12px;
  font-size: 9px;
  color: #96897c;
}
.panel {
  position: absolute;
  top: 77px;
  right: 27px;
  width: 340px;
  max-height: calc(100% - 125px);
  background: #fff;
  border-radius: 15px;
  box-shadow: 0 12px 40px #40383214;
  z-index: 3;
}
.panel-header {
  padding: 20px;
  border-bottom: 1px solid var(--line);
  top: 0;
  background: #fff;
  z-index: 1;
  display: flex;
}
.panel-header h2 {
  font-size: 16px;
  margin: 0;
}
.panel-header small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 7px;
}
.card {
  padding: 17px 20px;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.card-top {
  gap: 12px;
  cursor: pointer;
}
.house-art {
  width: 83px;
  height: 76px;
  border-radius: 8px;
  background: #f0e7d9;
}
.card h3 {
  font-size: 13px;
  line-height: 1.6;
  margin: 0 20px 6px 0;
  font-weight: 600;
}
.card p {
  font-size: 11px;
  color: var(--muted);
  margin: 5px 0;
  line-height: 1.8;
}
.price {
  font-size: 18px;
  color: var(--primary);
  font-weight: 750;
  letter-spacing: .3px;
}
.price small {
  font-size: 11px;
  font-weight: 400;
}
.card .heart {
  position: absolute;
  top: 14px;
  right: 12px;
  font-size: 20px;
  color: #b7a797;
}
.card .heart.saved {
  color: #a52323;
}
.card-tag {
  font-size: 9px;
  background: #f8f0e4;
  border-radius: 4px;
  padding: 3px 6px;
  margin-top: 7px;
  color: #967848;
}
.marker {
  cursor: pointer;
}
.marker .point-pin {
  fill: #c9343b;
}
.marker-price text {
  font-size: 11px;
}
.marker text {
  fill: white;
  font-size: 12px;
  font-weight: 700;
  text-anchor: middle;
  pointer-events: none;
}
.marker-count text {
  font-size: 15px;
}
.marker:hover .point-pin,.marker:focus .point-pin {
  fill: #aa242e;
}
.marker:hover text,.marker:focus text {
  fill: white;
}
.cluster circle {
  fill: #a52323;
  stroke: #fff;
  stroke-width: 5;
  filter: drop-shadow(0 4px 8px #a5232330);
}
.cluster text {
  fill: white;
  font-size: 17px;
}
#loading,#error {
  position: absolute;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  padding: 15px;
  border-radius: 8px;
  font-size: 12px;
  z-index: 4;
}
#error {
  color: #a52323;
}
dialog {
  border: 0;
  border-radius: 18px;
  padding: 32px;
  width: 460px;
  max-width: calc(100% - 32px);
  color: var(--ink);
  box-shadow: 0 20px 80px #0002;
}
dialog::backdrop {
  background: #302c2966;
  backdrop-filter: blur(3px);
}
dialog h2 {
  font-size: 22px;
  margin: 0 0 14px;
}
dialog p {
  font-size: 13px;
  color: #77736e;
  line-height: 1.9;
}
.close-dialog {
  position: absolute;
  right: 14px;
  top: 10px;
  z-index: 2;
  width: 44px;
  height: 44px;
  display: flex;
  border: 1px solid #ded8d2;
  border-radius: 50%;
  background: #fff;
  color: #393939;
  font-size: 30px;
  box-shadow: 0 2px 10px #0003;
}
.close-dialog:hover {
  background: #f5f1ec;
}
.close-dialog:active {
  background: #e9e3dd;
}
dialog select {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  width: 100%;
  margin-bottom: 12px;
}
dialog label {
  display: block;
  font-size: 12px;
  margin: 12px 0;
}
.primary {
  background: var(--primary);
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  width: 100%;
}
@media (min-width:1600px) {
  .map-caption {
    left: 65px;
    top: 130px;
    width: 330px;
  }
  .map-caption h1 {
    font-size: 36px;
  }
}
@media (max-width:1100px) {
  header {
    padding: 0 22px;
  }
  .toolbar {
    padding: 0 22px 16px;
    gap: 12px;
  }
  .modes button {
    padding: 10px 12px;
  }
  .filter-button {
    min-width: 70px;
  }
  .header-title {
    font-size: 16px;
  }
  .map-caption {
    width: 210px;
    left: 28px;
  }
  .map-caption h1 {
    font-size: 24px;
  }
  .panel {
    width: 305px;
    right: 20px;
  }
  .header-right .text-button {
    display: none;
  }
}
@media (max-width:767.98px) {
  .brand {
    font-size: 21px;
  }
  main {
    margin: 0;
  }
  .header-title {
    font-size: 15px;
    letter-spacing: 0;
  }
  .header-title>span {
    font-size: 9px;
    margin-top: 5px;
    letter-spacing: .3px;
  }
  .toolbar {
    padding: 0 12px 10px;
  }
  .modes {
    justify-content: space-between;
    background: none;
    padding: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    margin-bottom: 10px;
  }
  .modes button {
    flex: 1;
    border-radius: 0;
    padding: 10px 4px;
  }
  .modes button.active {
    background: none;
    color: var(--primary);
    font-weight: 700;
  }
  .filters {
    gap: 6px;
  }
  .search {
    padding: 0 8px;
  }
  .search input {
    height: 35px;
    font-size: 11px;
  }
  .filter-button {
    min-width: 60px;
    font-size: 11px;
    gap: 6px;
    padding: 0 8px;
  }
  .filters>.text-button {
    display: none;
  }
  .map-caption {
    top: 76px;
    left: 23px;
    width: 150px;
  }
  .map-caption h1 {
    font-size: 20px;
    line-height: 1.55;
    letter-spacing: 1px;
    margin: 9px 0;
  }
  .map-caption p {
    font-size: 10px;
    line-height: 1.8;
    margin: 0;
  }
  #stepLabel {
    font-size: 8px;
    letter-spacing: 1px;
  }
  .map-tools {
    right: 13px;
    bottom: 60px;
  }
  .map-tools button {
    width: 36px;
    height: 36px;
    font-size: 20px;
  }
  .legend {
    bottom: 23px;
    left: 10px;
    font-size: 8px;
    gap: 5px;
    padding: 7px;
  }
  .map-note {
    font-size: 7px;
    right: 6px;
    bottom: 5px;
  }
  .region-label {
    font-size: 11px;
  }
  .panel {
    top: auto;
    bottom: 0;
  }
  .card {
    padding: 13px 18px;
  }
  .map-shell.panel-open .map-caption {
    display: none;
  }
  .map-shell.panel-open .legend {
    display: none;
  }
}
#googleMap {
  inset: 0;
}
.google-active .legend {
  bottom: 38px;
}
.google-active .map-note {
  bottom: 25px;
  right: 80px;
  background: #ffffffcf;
  border-radius: 4px;
  padding: 3px 7px;
}
.google-property {
  position: absolute;
  transform: translate(-50%,-50%);
  white-space: nowrap;
  padding: 9px 12px;
  border: 1px solid #e2d3c6;
  border-radius: 9px;
  background: white;
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 3px 8px #40383222;
  pointer-events: auto;
}
.google-property:hover,.google-property:focus {
  background: var(--primary);
  color: white;
}
.google-pin {
  transform: translate(-50%,-100%);
  width: 32px;
  height: 44px;
  padding: 0 0 14px;
  border: 0;
  border-radius: 0;
  background: #c9343b;
  color: white;
  font-size: 15px;
  box-shadow: none;
  clip-path: path("M16 0 C7 0 0 7 0 16 C0 26 10 29 14 40 L15 44 H17 L18 40 C22 29 32 26 32 16 C32 7 25 0 16 0 Z");
}
.google-pin-price {
  width: 76px;
  padding-bottom: 8px;
  font-size: 11px;
  clip-path: path("M8 0 H68 Q76 0 76 8 V28 Q76 36 68 36 H46 L38 44 L30 36 H8 Q0 36 0 28 V8 Q0 0 8 0 Z");
}
.google-cluster {
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  border: 4px solid white;
  font-size: 17px;
}
.google-properties {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
}
@media (max-width:767.98px) {
  .google-active .map-note {
    display: none;
  }
  .google-active .legend {
    bottom: 30px;
  }
}
.town-outside-mask {
  pointer-events: none;
  width: auto;
  height: auto;
}
.town-map-label {
  fill: #61232b;
  stroke: #fff;
  stroke-width: 3px;
  stroke-linejoin: round;
  paint-order: stroke;
  text-anchor: middle;
  font-size: 12px;
  font-weight: 700;
}
.google-active.town-focused .map-caption {
  width: 190px;
  padding: 14px 16px;
  border-radius: 10px;
  background: #ffffffea;
  top: 83px;
  left: 28px;
}
.google-active.town-focused .map-caption h1 {
  font-size: 22px;
  line-height: 1.3;
  margin: 8px 0;
}
.google-active.town-focused .map-caption p {
  font-size: 11px;
}
@media (max-width:767.98px) {
  .google-active.town-focused .map-caption {
    top: 65px;
    left: 12px;
    width: 155px;
    padding: 10px 12px;
  }
  .google-active.town-focused .map-caption h1 {
    font-size: 18px;
  }
  .google-active.town-focused .map-caption p {
    font-size: 10px;
  }
}
/* Supplied yes319 brand artwork retains its original proportions. */
.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 98px;
  min-height: 52px;
  letter-spacing: normal;
}
.brand img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}
.modes button.active {
  box-shadow: 0 3px 7px #a5232320;
}
.region-label {
  stroke: #fffdf9;
}
@media (max-width:767.98px) {
  .brand {
    width: 112px;
    min-height: 36px;
    flex-shrink: 0;
  }
  .modes button.active {
    box-shadow: inset 0 -3px var(--primary);
  }
}
/* Mobile branding belongs in the header; the bottom bar is navigation only. */
.mobile-brand {
  display: none;
}
@media (max-width:767.98px) {
  header .mobile-brand {
    display: flex;
    min-height: 42px;
    justify-content: flex-start;
  }
  .header-title {
    display: none;
  }
  .header-right {
    margin-left: auto;
  }
}
/* Warm-white map demonstration. */
.region {
  fill: #f1efea;
  stroke: #fafaf8;
}
.region.selected {
  fill: #e7e1d6;
}
.region.town-option,.town-map-outline {
  fill: transparent;
  stroke: #a23c46;
  stroke-width: 1.5;
  stroke-dasharray: 5 4;
}
.region.town-option:hover,.region.town-option:focus,.town-map-outline.is-hovered {
  stroke: #921f29;
  stroke-width: 3.5;
  stroke-dasharray: none;
}
/* List selection and its map position share a persistent selected state. */
.card {
  cursor: pointer;
}
.card.is-selected {
  background: #fcf2ef;
  box-shadow: inset 3px 0 var(--primary);
}
.card.is-selected .card-top h3 {
  color: var(--primary);
}
.card-actions {
  gap: 8px;
}
.card-actions .card-tag {
  margin-top: 0;
}
.detail-button {
  font-size: 11px;
  color: var(--primary);
  border: 1px solid #dfb6a9;
  border-radius: 6px;
  padding: 6px 8px;
  background: #fff;
}
.google-property.is-selected {
  background: #17365d;
  color: #fff;
  border: 3px solid #fff;
}
.google-pin.is-selected {
  isolation: isolate;
  background: #fff;
  border: 0;
}
/* 內層沿用標記輪廓，讓白框沿著圓角與尖角顯示。 */
.google-pin.is-selected::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: #17365d;
  clip-path: inherit;
  transform: scale(.84, .88);
}
.google-pin-price.is-selected::before {
  transform: scale(.93, .88);
}
.marker.is-selected .point-pin {
  fill: #17365d;
  stroke: #fff;
  stroke-width: 2.5px;
}
.marker.is-selected text {
  fill: #fff;
}
/* Mobile header keeps branding and saved properties together. */
.mobile-saved {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 4px;
  font-size: 12px;
  white-space: nowrap;
  position: relative;
}
.mobile-saved>span {
  font-size: 25px;
  color: var(--primary);
  line-height: 1;
}
.mobile-saved b {
  position: absolute;
  top: 0;
  left: 18px;
  min-width: 17px;
  padding: 2px 4px;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  border: 2px solid white;
  font-size: 10px;
  font-weight: 600;
  text-align: center;
}
@media (max-width:767.98px) {
  header .mobile-brand {
    width: 145px;
  }
  .mobile-saved {
    display: flex;
    align-items: center;
    min-height: 44px;
    border-radius: 9px;
    white-space: nowrap;
  }
  .mobile-saved>span {
    color: var(--primary);
    line-height: 1;
  }
  .mobile-saved b {
    padding: 2px 4px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
  }
}
/* Saved properties use a compact header action and a mobile bottom sheet. */
.saved-heading h2 {
  display: flex;
  align-items: center;
  gap: 10px;
}
.saved-heading h2 small {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}
.saved-heading p {
  font-size: 12px;
  margin: 0 0 18px;
}
.saved-card {
  border-top: 1px solid var(--line);
  padding: 16px 0;
}
.saved-location {
  gap: 13px;
  padding: 0 34px 0 0;
}
.saved-info {
  gap: 5px;
  min-width: 0;
}
.saved-info>small {
  font-size: 10px;
  color: var(--muted);
}
.saved-info strong {
  font-size: 14px;
  line-height: 1.5;
}
.saved-remove {
  right: -5px;
  top: 14px;
  min-width: 44px;
  min-height: 44px;
  color: var(--primary);
  font-size: 21px;
}
@media (max-width:767.98px) {
  .mobile-saved {
    position: relative;
    border: 0;
    background: none;
    padding: 8px 4px;
    font-size: 12px;
  }
  .mobile-saved>span {
    position: relative;
    font-size: 25px;
  }
  .mobile-saved b {
    position: absolute;
    top: 0;
    left: 18px;
    background: var(--primary);
    color: #fff;
    min-width: 17px;
    text-align: center;
    border: 2px solid white;
  }
  dialog.saved-dialog {
    position: fixed;
    inset: auto 0 0;
    margin: 0;
    width: 100%;
    max-width: 100%;
    max-height: 78dvh;
    border-radius: 20px 20px 0 0;
    padding: 28px 22px max(22px,env(safe-area-inset-bottom));
    animation: saved-slide-in .2s ease-out;
  }
  dialog.saved-dialog:before {
    content: "";
    position: absolute;
    width: 34px;
    height: 4px;
    border-radius: 4px;
    top: 9px;
    left: calc(50% - 17px);
    background: var(--line);
  }
  .saved-dialog .close-dialog {
    min-width: 44px;
    min-height: 44px;
    right: 10px;
    top: 12px;
  }
  .saved-heading h2 {
    font-size: 20px;
    margin-bottom: 8px;
    padding-right: 30px;
  }
}
@keyframes saved-slide-in{from{transform:translateY(40px);opacity:0}to{transform:translateY(0);opacity:1}}
@media (prefers-reduced-motion:reduce) {
  dialog.saved-dialog {
    animation: none;
  }
}
/* Search criteria mirror the existing search fields without changing map selection. */
@media (min-width: 768px) {
  .toolbar {
    display: grid;
    grid-template-rows: 1fr;
    padding: 0;
    border: 0;
    overflow: hidden;
    transition: grid-template-rows 200ms ease;
  }
  .toolbar[inert] {
    grid-template-rows: 0fr;
  }
  .search-toolbar-slide {
    min-height: 0;
    transition: transform 200ms ease;
  }
  .toolbar[inert] .search-toolbar-slide {
    transform: translateY(-100%);
  }
  .search-toolbar-controls {
    column-gap: 12px;
  }
  .search-toolbar-slide {
    padding-inline: 35px;
  }
  .search-toolbar-slide::after {
    content: "";
    display: block;
    height: 18px;
  }
  .active-filters-row {
    margin-top: 10px;
  }
}
@media (min-width: 768px) and (max-width: 1100px) {
  .search-toolbar-slide {
    padding-inline: 22px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .toolbar,
  .search-toolbar-slide {
    transition: none;
  }
}
.active-filters {
  min-width: 0;
  gap: 7px;
  overflow-x: auto;
  max-width: 100%;
  padding: 2px 0;
}
.active-filters button {
  flex-shrink: 0;
  border-radius: 16px;
  background: #fbefeb;
  color: var(--primary);
  font-size: 11px;
  padding: 6px 10px;
}
.search-dialog {
  width: 600px;
  max-height: 85dvh;
  padding: 28px;
}
.search-dialog h2 {
  font-size: 21px;
  margin-right: 25px;
}
.search-context {
  font-size: 11px !important;
  margin-bottom: 20px;
}
.search-field {
  border: 0;
  margin: 0 0 22px;
  min-width: 0;
}
.search-field legend,.search-select {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 10px;
}
.search-presets {
  gap: 6px;
  margin: 9px 0;
}
.search-presets button {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 9px;
  font-size: 11px;
  background: #fff;
}
.search-presets button:hover {
  color: var(--primary);
  border-color: var(--primary);
}
.search-range {
  grid-template-columns: minmax(0,1fr) 24px minmax(0,1fr);
  gap: 6px;
}
.search-range>span {
  text-align: center;
  font-size: 11px;
  color: var(--muted);
}
.search-dialog input:not([type=checkbox]),.search-dialog select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  margin: 0;
}
.search-dialog input[type=checkbox] {
  accent-color: var(--primary);
  width: 15px;
  height: 15px;
  margin: 0;
}
.use-options {
  gap: 7px;
  margin-top: 10px;
}
.use-options label {
  display: flex;
  gap: 6px;
  align-items: center;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px 9px;
  font-size: 12px;
  font-weight: 400;
  cursor: pointer;
}
.use-options label:has(input:checked) {
  background: #fbefeb;
  border-color: #c77369;
  color: var(--primary);
}
.search-select {
  margin: 0 0 22px !important;
}
.search-select select,.search-select>input {
  display: block;
  margin-top: 10px !important;
  font-weight: 400;
}
.search-footer {
  bottom: -28px;
  gap: 12px;
  background: #fff;
  padding: 16px 0;
  margin-top: 12px;
  border-top: 1px solid var(--line);
}
.search-footer>button:first-child {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--muted);
}
.search-footer .primary {
  font-size: 13px;
}
@media (max-width:767.98px) {
  .active-filters {
    margin-top: 8px;
    gap: 5px;
  }
  .active-filters button {
    font-size: 10px;
  }
  .search-dialog h2 {
    font-size: 19px;
  }
  .search-dialog .close-dialog {
    min-width: 40px;
    min-height: 40px;
    top: 10px;
    right: 7px;
  }
  .search-dialog input:not([type=checkbox]),.search-dialog select {
    font-size: 16px;
  }
  .search-range {
    gap: 3px;
    grid-template-columns: minmax(0,1fr) 18px minmax(0,1fr);
  }
  .search-footer {
    bottom: -24px;
    padding-bottom: 12px;
  }
}
/* Keyword search sits directly in the main toolbar. */
.search>button {
  font-size: 24px;
  color: #8b8177;
  padding: 0;
  min-width: 28px;
  min-height: 40px;
  flex-shrink: 0;
}
@media (max-width:767.98px) {
  .search {
    gap: 3px;
  }
  .search>button {
    min-width: 22px;
    min-height: 35px;
  }
  .search input {
    min-width: 0;
  }
}
/* Real-data search range and paginated results. */
.range-toolbar {
  display: flex;
  gap: 10px;
  background: #fffffff2;
  border: 1px solid var(--line);
  padding: 9px 12px;
  border-radius: 9px;
  font-size: 11px;
  box-shadow: 0 2px 10px #39393907;
  max-width: 100%;
}
.range-toolbar label {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
}
.range-toolbar select {
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 5px;
  background: white;
  color: var(--ink);
  font-size: 11px;
}
.range-toolbar #searchRangeBtn {
  background: var(--primary);
  color: #fff;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 11px;
}
.header-external-list {
  min-height: 32px;
  padding: 8px 10px;
  border: 1px solid var(--primary);
  border-radius: 6px;
  color: var(--primary);
  background: #fff;
  font-size: 11px;
}
.header-external-list:hover {
  background: #fbefeb;
}
.town-focused .map-caption,.google-active.town-focused .map-caption {
  top: 145px;
}
.list-pagination.is-auto {
  min-height: 1px;
}
.list-pagination.is-auto .load-more {
  display: none;
}
.load-more {
  padding: 16px;
  font-size: 13px;
  color: var(--primary);
  background: #fcf7f3;
}
.load-more:disabled {
  color: var(--muted);
}
.house-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.detail-link {
  display: block;
  text-align: center;
  text-decoration: none;
  font-size: 13px;
}
.card-tag {
  max-width: 145px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#dataLoading {
  position: absolute;
  top: 135px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  background: #fff;
  padding: 12px 18px;
  border-radius: 8px;
  box-shadow: 0 4px 18px #0001;
  font-size: 12px;
  white-space: nowrap;
}
#error button {
  color: var(--primary);
  text-decoration: underline;
  padding: 5px;
}
@media (max-width:767.98px) {
  .range-toolbar {
    gap: 6px;
    padding: 7px 9px;
    font-size: 10px;
  }
  .range-toolbar label {
    font-size: 10px;
  }
  .range-toolbar select,.range-toolbar #searchRangeBtn {
    font-size: 10px;
  }
  .town-focused .map-caption,.google-active.town-focused .map-caption {
    top: 145px;
  }
  #dataLoading {
    top: 145px;
  }
}
@media (max-width:767.98px) {
  .range-toolbar {
    max-width: 100%;
  }
  .range-toolbar label,.range-toolbar button {
    min-height: 32px;
  }
}
/* Map identification and legend share a row above Google attribution. */
.map-footer {
  position: absolute;
  left: 32px;
  bottom: 24px;
  display: flex;
  gap: 14px;
  max-width: calc(100% - 64px);
  pointer-events: none;
  z-index: 1;
}
.map-brand-note small {
  display: block;
  font-size: 10px;
  line-height: 2;
  color: var(--muted);
}
.map-footer .legend {
  position: static;
  min-width: 0;
  flex-wrap: wrap;
}
.google-active .map-footer {
  bottom: 38px;
}
@media (max-width:767.98px) {
  .map-footer {
    left: 10px;
    bottom: 23px;
    gap: 8px;
    max-width: calc(100% - 20px);
  }
  .map-brand-note small {
    font-size: 9px;
  }
}
/* Desktop and mobile share one logo in the header, before the page heading. */
.header-intro {
  gap: 20px;
  min-width: 0;
}
header .mobile-brand {
  display: flex;
  width: 145px;
  flex-shrink: 0;
}
@media (max-width:767.98px) {
  .header-intro {
    gap: 0;
  }
}
/* 物件詳細資料獨立於列表，桌面向列表左側展開。 */
.property-detail {
  position: absolute;
  z-index: 4;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 12px 40px #40383226;
}
.property-detail h2 {
  font-size: 19px;
  line-height: 1.5;
  margin: 18px 0 14px;
  padding-right: 22px;
}
.property-detail p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.9;
}
@media (max-width:767.98px) {
  .property-detail {
    display: none;
  }
}
/* 列表與左側詳情緊鄰，合計最多佔視窗一半，另一半保留給目標標記。 */
@media (min-width:768px) {
  .panel {
    width: min(340px,25vw);
  }
  .card-top {
    min-width: 0;
  }
  .card-top>div:last-child {
    min-width: 0;
  }
  .card h3,.property-detail h2 {
    overflow-wrap: anywhere;
  }
  .card-actions {
    flex-wrap: wrap;
  }
  .panel .house-art {
    width: 64px;
    height: 64px;
  }
}
@media (min-width:768px) {
  .town-focused.panel-open .map-caption {
    display: none;
  }
}
/* 物件列表：桌面大圖卡片；手機底部列表保留較多地圖空間。 */
.panel-handle {
  display: none;
}
.panel-header>div {
  min-width: 0;
}
.panel .card {
  padding: 12px;
  border: 1px solid var(--line);
  margin: 10px;
  border-radius: 10px;
  background: #fff;
}
.panel .card.is-selected {
  border: 2px solid var(--primary);
  box-shadow: none;
  padding: 11px;
}
.panel .card-top {
  display: flex;
  flex-direction: column;
  gap: 10px;
  outline-offset: 2px;
}
.panel .house-art {
  width: 100%;
  height: auto;
  aspect-ratio: 16/10;
  border-radius: 7px;
}
.panel .card-info {
  width: 100%;
  min-width: 0;
}
.panel .card h3 {
  margin: 7px 0;
  font-size: 13px;
  line-height: 1.55;
}
.panel .card .heart {
  top: 19px;
  right: 19px;
  background: #ffffffed;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: var(--primary);
  display: grid;
  place-items: center;
  padding: 0;
  line-height: 1;
}
.panel .card:not(:has(.house-art)) .card-info {
  padding-right: 26px;
}
.panel .card-facts {
  color: var(--ink);
  font-size: 11px;
  margin: 2px 0;
}
.panel .card-location {
  font-size: 10px;
}
.panel .card-actions {
  gap: 6px;
  margin-top: 8px;
}
.panel .card-tag {
  max-width: 100%;
  white-space: normal;
}
.panel .house-art .card-tag {
  position: absolute;
  top: 5px;
  left: 5px;
  max-width: calc(100% - 10px);
  margin-top: 0;
}
.panel.is-expanded .panel-handle {
  background: #fff;
}
/* 詳情：照片集、面積與特色分區，以及隨捲動保留的聯絡操作。 */
.property-detail {
  padding: 0;
  border-radius: 12px 0 0 12px;
  overscroll-behavior: contain;
}
.property-detail>.close-dialog {
  position: sticky;
  top: 10px;
  float: right;
  margin: 10px 10px -54px 0;
  z-index: 3;
}
.property-detail h2,.property-dialog h2 {
  font-size: 18px;
  line-height: 1.5;
  margin: 0;
  padding: 0;
  overflow-wrap: anywhere;
}
.detail-copy {
  padding: 20px;
}
.detail-title-row {
  gap: 10px;
}
.detail-title-row h2 {
  flex: 1;
}
.detail-heart {
  font-size: 24px;
  padding: 2px;
  color: var(--primary);
}
.detail-address {
  font-size: 11px !important;
  line-height: 1.7 !important;
  color: var(--muted);
  margin: 10px 0;
}
.detail-price-row {
  margin: 14px 0;
}
.detail-price-row .price {
  font-size: 25px;
}
.detail-price-row>span {
  font-size: 11px;
  color: var(--muted);
}
.detail-quick-facts {
  grid-template-columns: repeat(2,minmax(0,1fr));
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 18px 0;
}
.detail-quick-facts>div {
  padding: 11px;
  border-bottom: 1px solid var(--line);
}
.detail-quick-facts dt {
  font-size: 10px;
  color: var(--muted);
}
.detail-quick-facts dd {
  font-size: 12px;
  margin: 5px 0 0;
  overflow-wrap: anywhere;
}
.detail-section {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.detail-section h3 {
  font-size: 14px;
  margin: 0 0 12px;
}
.detail-description {
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.detail-description-wrap.is-collapsed {
  max-height: 190px;
  overflow: hidden;
}
.detail-description-wrap.is-collapsed::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 60px;
  background: linear-gradient(transparent, #fff);
  pointer-events: none;
}
.detail-description-toggle {
  padding: 4px 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  color: var(--primary);
  background: #fff;
  font-size: 12px;
}
.detail-facts>div {
  display: grid;
  grid-template-columns: 5.5em minmax(0,1fr);
  gap: 8px;
  padding: 9px 0;
  border-bottom: 1px solid #f4f0ed;
  font-size: 12px;
}
.detail-facts dt {
  color: var(--muted);
}
.detail-facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.unit-note {
  font-size: 10px !important;
  line-height: 1.7 !important;
  color: var(--muted);
}
.detail-footer {
  bottom: 0;
  background: #fff;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  z-index: 2;
}
.detail-footer-actions a {
  flex: 1;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 11px 8px;
  text-align: center;
  text-decoration: none;
}
.contact-detail {
  border: 1px solid var(--primary);
  color: var(--primary);
  border-radius: 8px;
}
.detail-status {
  font-size: 12px;
  padding: 15px;
  background: #f5f1ec;
  border-radius: 8px;
}
.retry-detail {
  color: var(--primary);
}
.detail-gallery {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: 90px 90px;
  background: #f5f1ec;
}
.gallery-tile {
  background: #f5f1ec;
  min-width: 0;
}
.gallery-tile:first-child {
  grid-row: 1/3;
}
.gallery-tile:only-child {
  grid-column: 1 / -1;
}
.gallery-tile img,.detail-preview-photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.photo-all {
  position: absolute;
  background: #302c29c9;
  color: white;
  font-size: 10px;
  padding: 5px 8px;
  border-radius: 12px;
  bottom: 8px;
  left: 8px;
}
.photo-all {
  left: auto;
  right: 8px;
  bottom: 34px;
  font-size: 9px;
}
.detail-preview-photo {
  height: 150px;
}
.detail-no-photo {
  height: 100px;
  background: #f5f1ec;
  place-items: center;
  font-size: 11px;
  color: var(--muted);
}
.property-dialog {
  padding: 0;
  width: 640px;
  max-height: calc(100dvh - 24px);
  overscroll-behavior: contain;
}
.property-dialog #closeDialog {
  position: sticky;
  top: 12px;
  float: right;
  margin: 12px 12px -56px 0;
  right: auto;
  z-index: 4;
}
.property-dialog #dialogContent {
  clear: none;
}
.property-dialog .detail-copy {
  padding: 22px;
}
@media (min-width:768px) and (max-width:1100px) {
  .detail-copy {
    padding: 14px;
  }
  .property-detail h2 {
    font-size: 15px;
  }
  .detail-quick-facts>div {
    padding: 8px;
  }
}
@media (max-width:767.98px) {
  .panel {
    height: 46%;
    max-height: 46%;
    left: 0;
    right: 0;
    border-radius: 17px;
    width: auto;
    overscroll-behavior: contain;
  }
  .panel-handle {
    display: block;
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 2;
    background: #fff;
    border-radius: 17px 17px 0 0;
  }
  .panel-header {
    top: 18px;
    padding: 8px 14px;
  }
  .panel-header h2 {
    font-size: 13px;
  }
  .panel-header small {
    font-size: 10px;
    margin-top: 4px;
  }
  .panel .card {
    padding: 10px;
    margin: 8px 10px;
  }
  .panel .card.is-selected {
    padding: 9px;
  }
  .panel .card-top {
    flex-direction: row;
    gap: 10px;
    align-items: flex-start;
  }
  .panel .house-art {
    width: 90px;
    height: 78px;
    aspect-ratio: auto;
    flex-shrink: 0;
  }
  .panel .card-info {
    padding-right: 22px;
  }
  .panel .card h3 {
    font-size: 12px;
    margin: 5px 0;
  }
  .panel .card .price {
    font-size: 19px;
  }
  .panel .card .heart {
    width: 26px;
    height: 26px;
    top: 10px;
    right: 8px;
    background: white;
    font-size: 22px;
  }
  .panel .card-facts,.panel .card-location {
    line-height: 1.5;
  }
  .panel .card-actions {
    justify-content: space-between;
  }
  .panel .detail-button {
    font-size: 10px;
  }
  .panel .card-tag {
    font-size: 9px;
  }
  .google-active.panel-open #googleMap {
    bottom: 46%;
  }
  .google-active.panel-open .panel {
    height: 46%;
  }
  .map-shell.panel-open .map-tools {
    bottom: 49%;
  }
  .panel.is-expanded {
    height: 70%;
    max-height: 70%;
  }
  .google-active.panel-open:has(.panel.is-expanded) #googleMap {
    bottom: 70%;
  }
  .google-active.panel-open .panel.is-expanded {
    height: 70%;
  }
  .map-shell.panel-open:has(.panel.is-expanded) .map-tools {
    bottom: 73%;
  }
  .property-dialog {
    width: calc(100% - 16px);
    max-width: none;
    max-height: calc(100dvh - 20px);
    border-radius: 16px;
  }
  .property-dialog .detail-copy {
    padding: 18px;
  }
  .property-dialog h2 {
    font-size: 18px;
  }
  .property-dialog .photo-all {
    bottom: 10px;
    font-size: 11px;
  }
  .property-dialog .detail-footer {
    padding-bottom: max(12px,env(safe-area-inset-bottom));
  }
}
/* 照片視窗：獨立頂層 dialog，關閉不影響原詳情及列表捲動。 */
#photoViewer {
  position: fixed;
  inset: 0;
  margin: 0;
  padding: 0;
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  border-radius: 0;
  background: #232323;
  color: #fff;
  overflow: hidden;
}
#photoViewer[open] {
  display: grid;
  grid-template-columns: minmax(0,1fr) 145px;
  grid-template-rows: 64px minmax(0,1fr);
  gap: 10px;
}
#photoViewer::backdrop {
  background: #000c;
}
#photoViewer .photo-header {
  grid-column: 1/3;
  display: flex;
  align-items: center;
  height: 64px;
  background: transparent;
  padding: 16px 76px 16px 24px;
  min-width: 0;
}
#photoViewer .photo-header h2 {
  font-size: 15px;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.photo-stage {
  min-width: 0;
  min-height: 0;
  padding: 12px 20px 40px;
}
.photo-main {
  position: relative;
  touch-action: pan-y;
  color: #fff;
}
.photo-main img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  min-height: 0;
}
/* 導覽層與主照片內容區同範圍，排除上下不同的留白。 */
.photo-navigation {
  position: absolute;
  inset: 12px 20px 40px;
  pointer-events: none;
}
.photo-prev,.photo-next {
  place-items: center;
  pointer-events: auto;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #0009;
  color: white;
  line-height: 1;
}
.photo-prev,.photo-next {
  padding: 0;
}
.photo-prev {
  left: 2px;
}
.photo-next {
  right: 2px;
}
.photo-counter {
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  background: #0008;
  padding: 5px 12px;
  border-radius: 12px;
}
.photo-thumbnails {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: auto;
  padding: 12px 14px 24px 0;
  overscroll-behavior: contain;
}
.photo-thumbnails button {
  width: 100%;
  height: 85px;
  flex-shrink: 0;
  border: 3px solid transparent;
  border-radius: 8px;
  padding: 0;
  overflow: hidden;
  background: #393939;
}
.photo-thumbnails button.selected {
  border-color: #d44c4c;
}
.photo-thumbnails img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
@media (max-width:767.98px) {
  #photoViewer[open] {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding-top: env(safe-area-inset-top);
  }
  #photoViewer .photo-header {
    height: 65px;
    min-height: 65px;
    padding: 14px 70px 14px 18px;
  }
  #photoViewer .photo-header h2 {
    font-size: 13px;
  }
  .photo-stage {
    flex: 1;
    min-height: 0;
    padding: 8px 0 42px;
  }
  .photo-navigation {
    inset: 8px 0 42px;
  }
  .photo-prev {
    left: 10px;
  }
  .photo-next {
    right: 10px;
  }
  .photo-thumbnails {
    height: 110px;
    flex: none;
    flex-direction: row;
    padding: 10px 12px max(12px,env(safe-area-inset-bottom));
    gap: 8px;
  }
  .photo-thumbnails button {
    width: 86px;
    height: 74px;
  }
  .photo-counter {
    bottom: 12px;
  }
}
@media (min-width:1101px) {
  .panel {
    width: min(300px,20vw);
  }
}
/* 桌面列表貼齊地圖右側；底部僅保留 Google 地圖標示空間。 */
@media (min-width:768px) {
  .panel {
    top: 0;
    right: 0;
    height: calc(100% - 28px);
    max-height: calc(100% - 28px);
    border-radius: 0 0 15px 15px;
    border-left: 1px solid var(--line);
    box-shadow: -4px 0 16px #40383210;
  }
  .property-detail {
    border-radius: 0 0 15px 15px;
    box-shadow: -4px 0 16px #40383210;
  }
}
/* 桌面聯絡資料視窗，獨立於物件詳情，保留原列表／詳情位置。 */
#contactDialog {
  width: 440px;
  max-height: calc(100dvh - 32px);
  padding: 28px;
  overscroll-behavior: contain;
}
#contactDialog h2 {
  padding-right: 40px;
  font-size: 21px;
}
.contact-facts {
  margin: 22px 0;
}
.contact-facts>div {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.contact-facts dt {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 6px;
}
.contact-facts dd {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
/* 關鍵字搜尋採明確的紅底按鈕，保留右側位置與表單送出行為。 */
#keywordSearch {
  padding: 4px 4px 4px 12px;
  gap: 8px;
}
#keywordSearch input {
  flex: 1;
  min-width: 0;
  width: 0;
}
#keywordSearch .search-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 74px;
  min-height: 40px;
  padding: 0 12px;
  background: var(--primary);
  border: 1px solid var(--primary);
  border-radius: 6px;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 2px 5px #a5232320;
}
#keywordSearch .search-submit:hover {
  background: #8c1d1d;
  border-color: #8c1d1d;
}
#keywordSearch .search-submit:active {
  background: #751818;
  box-shadow: none;
}
@media (max-width:767.98px) {
  #keywordSearch {
    padding-left: 9px;
    gap: 4px;
  }
  #keywordSearch .search-submit {
    min-width: 62px;
    min-height: 40px;
    padding: 0 8px;
    gap: 4px;
  }
}
/* Bootstrap stretched-link 模式：覆蓋範圍以卡片為準，收藏維持獨立點擊層。 */
.panel .card {
  position: relative;
  isolation: isolate;
}
.panel .card .stretched-link {
  position: static;
  text-decoration: none;
  display: inline-block;
}
.panel .card .stretched-link::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  content: "";
}
.panel .card .stretched-link:focus-visible::after {
  outline: 3px solid #e7a85e;
  outline-offset: -3px;
  border-radius: 9px;
}
.panel .card .heart {
  z-index: 2;
}
/* 使用說明導覽：高亮區可操作，提示卡與遮罩不改動查詢及收藏狀態。 */
.header-right #helpBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 5px 9px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 8px;
}
#usageGuide {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
}
.guide-shade {
  background: #24282d9c;
  pointer-events: auto;
}
.guide-card {
  width: 330px;
  max-width: calc(100vw - 24px);
  max-height: calc(100dvh - 24px);
  pointer-events: auto;
  border: 1px solid #e9e3dd;
  border-radius: 15px;
  background: #fff;
  padding: 18px 20px;
  box-shadow: 0 12px 40px #0003;
  color: var(--ink);
  overscroll-behavior: contain;
}
.guide-card h2 {
  font-size: 18px;
  line-height: 1.5;
  margin: 8px 0 10px;
}
.guide-card p {
  font-size: 13px;
  line-height: 1.85;
  margin: 0 0 14px;
}
.guide-card .guide-hint {
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 16px;
}
.guide-prev {
  font-size: 12px;
  border: 1px solid var(--line);
  padding: 9px 12px;
  border-radius: 7px;
  background: white;
}
.guide-prev:disabled {
  opacity: .4;
  cursor: default;
}
@media (max-width:767.98px) {
  .header-right #helpBtn {
    width: 30px;
    min-height: 34px;
    padding: 0;
    border: 0;
  }
  .help-label {
    display: none;
  }
  .guide-card {
    width: calc(100vw - 24px);
    padding: 15px 18px;
    padding-bottom: max(15px,env(safe-area-inset-bottom));
    border-radius: 16px;
  }
  .guide-card h2 {
    font-size: 17px;
  }
  .guide-card p {
    font-size: 12px;
    line-height: 1.8;
    margin-bottom: 10px;
  }
  .guide-card .guide-hint {
    margin-bottom: 12px;
  }
  .guide-actions button {
    min-height: 40px;
  }
}
@media (max-width:360px) {
  header {
    padding-left: 10px;
    padding-right: 10px;
    gap: 6px;
  }
  header .mobile-brand {
    width: 120px;
  }
}
/* 詳情缺圖區塊使用指定底色。 */
.detail-no-photo {
  background: #f1f5f9;
  color: var(--muted);
}
/* 物件類型切換列背景使用指定色。 */
.modes {
  background: #f1f5f9;
}
/* 詳情底部操作維持同列排列，連結可隨容器縮放。 */
.detail-footer-actions {
  flex-wrap: nowrap;
  align-items: stretch;
}
.detail-footer-actions a {
  min-width: 0;
}
/* 自動更新提示：小幅左右移動圖示，尊重使用者減少動態效果設定。 */
.auto-search-hint {
  margin-top: 8px;
}
.auto-search-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  animation: map-hint-move 3s ease-in-out infinite;
}
@keyframes map-hint-move{0%,20%,80%,100%{transform:translateX(0)}40%{transform:translateX(-2px)}60%{transform:translateX(2px)}}
@media (prefers-reduced-motion:reduce) {
  .auto-search-icon {
    animation: none;
  }
}
/* 物件畫面只保留下方簡短提示；選區畫面仍保留原說明。 */
.auto-search-hint {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 6px 8px 6px 10px;
  background: #ffffffdb;
  border: 1px solid #e7edf2;
  border-radius: 7px;
  font-size: 10px;
  line-height: 1.5;
  color: var(--muted);
  white-space: nowrap;
  pointer-events: none;
}
/* 自動更新提示使用小型關閉按鈕，不套用圓形 close-dialog。 */
#closeAutoSearchHint {
  width: 24px;
  height: 24px;
  position: static;
  flex: none;
  pointer-events: auto;
}
.panel-header .close-dialog,.guide-top .guide-close {
  position: static;
  flex: none;
}
#guideNudge {
  padding-right: 64px;
}
@media (min-width:768px) {
  .town-focused.panel-open .map-footer {
    max-width: calc(50% - 48px);
    gap: 10px;
  }
}
@media (max-width:767.98px) {
  .auto-search-hint {
    font-size: 9px;
    gap: 5px;
    padding: 4px 5px 4px 8px;
  }
  .auto-search-hint .auto-search-icon {
    width: 16px;
    height: 16px;
    flex-basis: 16px;
  }
  .map-shell.panel-open .map-footer {
    display: none;
  }
}
/* 首次只提示使用說明入口，可關閉，不阻擋其他操作。 */
#guideNudge {
  position: fixed;
  z-index: 12;
  width: 250px;
  max-width: calc(100vw - 24px);
  padding: 15px 32px 14px 15px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 6px 24px #39393918;
}
#guideNudge strong {
  display: block;
  font-size: 12px;
  line-height: 1.6;
  font-weight: 600;
}
/* 手機選區與搜尋摘要合併；桌面保留原工具列。 */
.location-summary {
  pointer-events: auto;
}
.mobile-search-summary {
  display: none;
}
.mobile-mode-options {
  padding: 4px;
  background: #f1f5f9;
  border-radius: 9px;
}
.mobile-mode-options button {
  flex: 1;
  padding: 10px 3px;
  font-size: 12px;
  border-radius: 7px;
  white-space: nowrap;
}
.mobile-mode-options button[aria-pressed=true] {
  background: var(--primary);
  color: white;
}
@media (max-width:767.98px) {
  header {
    height: 62px;
    padding: 0 12px;
    gap: 8px;
  }
  .toolbar {
    display: none;
  }
  .map-heading {
    top: 12px;
    left: 12px;
    right: 12px;
    gap: 8px;
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .location-summary {
    flex-wrap: wrap;
    max-width: 100%;
    background: #f6f7f8;
    border: 1px solid #e3e7eb;
    border-radius: 10px;
    padding: 3px 5px;
    box-shadow: none;
  }
  #breadcrumbs {
    padding: 0;
    background: none;
    box-shadow: none;
    border-radius: 0;
    font-size: 12px;
  }
  #breadcrumbs button {
    min-height: 38px;
    padding: 5px 6px;
  }
  .mobile-search-summary {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 6px 10px;
    border-left: 1px solid #e3e7eb;
    border-radius: 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    white-space: nowrap;
  }
  .search-dialog {
    position: fixed;
    inset: auto 0 0;
    margin: 0;
    width: 100%;
    max-width: 100%;
    max-height: 88dvh;
    border-radius: 18px 18px 0 0;
    padding: 24px 18px max(18px,env(safe-area-inset-bottom));
  }
  .search-dialog .search-footer {
    bottom: -18px;
  }
}
@media (max-width:400px) {
  .location-summary {
    max-width: 100%;
  }
  .location-summary:has(#breadcrumbs button:nth-of-type(3)) .mobile-search-summary {
    flex-basis: 100%;
    border-left: 0;
    border-top: 1px solid #e3e7eb;
    justify-content: flex-start;
    padding-left: 6px;
    min-height: 34px;
  }
  header .mobile-brand {
    width: 125px;
  }
  .header-right {
    gap: 5px;
  }
}
/* 搜尋半徑以單選按鈕呈現，鍵盤與讀屏保留原生 radio 行為。 */
.radius-options label {
  position: relative;
  flex: 1;
  margin: 0;
  cursor: pointer;
}
.radius-options input[type=radio] {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.radius-options span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
}
.radius-options input:checked+span {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 600;
}
.radius-options input:focus-visible+span {
  outline: 3px solid #e7a85e;
  outline-offset: 3px;
}
/* 服務人員資料：會員頭像與姓名並列，缺圖保留預設人像。 */
.agent-identity {
  gap: 12px;
  min-width: 0;
}
.agent-identity>div {
  min-width: 0;
  overflow-wrap: anywhere;
}
.agent-identity p {
  margin: 5px 0 0;
}
.agent-avatar {
  position: relative;
  place-items: center;
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #f1f5f9;
  color: #94a3b8;
}
.agent-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  background: #f1f5f9;
}
/* my319 收藏與登入；收藏清單不受地圖選區限制，無位置保留原站查看入口。 */
.member-dialog input {
  display: block;
  width: 100%;
  height: 44px;
  margin-top: 7px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 16px;
}
.member-dialog form>label {
  margin: 18px 0;
}
.member-dialog h2 {
  padding-right: 30px;
}
.member-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
}
.member-actions a {
  color: var(--primary);
  text-decoration: none;
}
.member-actions {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.saved-row-actions {
  margin-top: 6px;
  font-size: 12px;
}
.saved-row-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  inline-size: 76px;
  min-height: 32px;
  white-space: nowrap;
}
.saved-status {
  font-size: 11px;
  color: var(--muted);
}
#memberSavedStatus,#temporaryPriceSaved p {
  font-size: 11px;
  color: var(--muted);
}
#temporaryPriceSaved h3 {
  font-size: 14px;
  margin-top: 24px;
}
/* 頂部操作統一外框、字級、高度與圖示比例；小螢幕保留可點選尺寸。 */
.header-right {
  gap: 8px;
}
.header-right .header-external-list,.header-right .mobile-saved,.header-right #helpBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  min-height: 40px;
  width: auto;
  min-width: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--primary);
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
}
.header-right .header-external-list:hover,.header-right .mobile-saved:hover,.header-right #helpBtn:hover {
  background: #fbefeb;
}
.header-right .header-external-list:active,.header-right .mobile-saved:active,.header-right #helpBtn:active {
  background: #f8e9e7;
}
.header-right .mobile-saved>.saved-label {
  font-size: 12px;
  line-height: 1;
  color: inherit;
}
.header-right .help-label {
  display: inline;
}
.header-right .mobile-saved b {
  top: -6px;
  left: auto;
  right: -5px;
  min-width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  padding: 0 3px;
  border: 2px solid white;
  font-size: 10px;
  line-height: 1;
}
@media (max-width:767.98px) {
  .header-right {
    gap: 6px;
  }
  .header-right .header-external-list,.header-right .mobile-saved,.header-right #helpBtn {
    padding: 0 9px;
  }
}
@media (max-width:360px) {
  .header-right {
    gap: 5px;
  }
  .header-right .mobile-saved>.saved-label,.header-right .help-label {
    display: none;
  }
  .header-right .mobile-saved,.header-right #helpBtn {
    width: 40px;
    padding: 0;
  }
}
/* 頂部操作移除外框，維持原有點擊範圍及間距。 */
.header-right .header-external-list,.header-right .mobile-saved,.header-right #helpBtn {
  border-color: transparent;
}
.header-right .header-external-list:hover,.header-right .mobile-saved:hover,.header-right #helpBtn:hover {
  border-color: transparent;
}
/* 手機選區：按鈕列表／地圖分頁，選定鄉鎮後還原物件地圖。 */
#areaSelectionTabs,#areaSelectionPanel {
  display: none;
}
@media (max-width:767.98px) {
  .mobile-area-selection {
    background: #fff;
  }
  .mobile-area-selection .map-heading {
    z-index: 5;
  }
  #areaSelectionTabs:not([hidden]) {
    display: flex;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    height: 48px;
    z-index: 4;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 0 12px;
  }
  #areaSelectionTabs button {
    flex: 1;
    min-height: 44px;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    font-size: 14px;
    color: var(--muted);
  }
  #areaSelectionTabs button[aria-selected=true] {
    border-bottom-color: var(--primary);
    color: var(--primary);
    font-weight: 600;
  }
  #areaSelectionPanel:not([hidden]) {
    display: flex;
    flex-direction: column;
    position: absolute;
    inset: 112px 0 0;
    z-index: 4;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #fff;
    padding: 22px 18px max(18px,env(safe-area-inset-bottom));
    touch-action: pan-y;
  }
  #areaSelectionTitle {
    font-size: 21px;
    margin: 0 0 8px;
    line-height: 1.5;
  }
  #areaSelectionDescription {
    font-size: 12px;
    color: var(--muted);
    margin: 0 0 20px;
    line-height: 1.7;
  }
  #areaSelectionGrid {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 8px;
  }
  #areaSelectionGrid button {
    min-height: 48px;
    border: 1px solid transparent;
    background: #f1f5f9;
    border-radius: 8px;
    padding: 10px 5px;
    font-size: 14px;
    line-height: 1.5;
    overflow-wrap: anywhere;
  }
  #areaSelectionGrid button:hover,#areaSelectionGrid button:active {
    background: #f8e9e7;
    border-color: #e5bdbc;
    color: var(--primary);
  }
  .area-selection-note {
    margin: auto 0 0;
    padding-top: 28px;
    font-size: 11px;
    color: var(--muted);
    line-height: 1.7;
  }
  .mobile-area-selection .map-caption,.mobile-area-selection .map-tools {
    display: none;
  }
  .selection-list-mode #mapCanvas,.selection-list-mode .map-footer {
    visibility: hidden;
  }
  .mobile-area-selection:not(.selection-list-mode) {
    background: var(--sea);
  }
  .mobile-area-selection:not(.selection-list-mode) .map-heading {
    background: #fff;
    top: 0;
    left: 0;
    right: 0;
    padding: 12px;
  }
}
/* my319 登入視窗：依參考版面分出標題、圖示欄位、登入操作與會員說明。 */
.member-dialog {
  width: 560px;
  max-width: calc(100% - 24px);
  max-height: calc(100dvh - 24px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  overscroll-behavior: contain;
}
.member-auth-header {
  padding: 24px 64px 22px 26px;
  border-bottom: 1px solid var(--line);
}
.member-dialog .member-auth-header h2 {
  padding: 0;
  margin: 0;
  font-size: 24px;
  line-height: 1.5;
}
.member-dialog #closeDialog {
  top: 19px;
  right: 16px;
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  border: 0;
  background: none;
  box-shadow: none;
  color: var(--muted);
}
.member-dialog #closeDialog:hover {
  background: #f1f5f9;
}
.member-auth-body {
  padding: 22px 26px 24px;
}
.member-dialog .member-auth-field {
  display: flex;
  align-items: center;
  margin: 0 0 12px;
  border: 1px solid #d9e2e6;
  border-radius: 9px;
  overflow: hidden;
  background: #fff;
  min-width: 0;
}
.member-auth-field:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px #a5232310;
}
.member-auth-icon {
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  background: #f4f7f8;
  border-right: 1px solid #d9e2e6;
  color: #6d8086;
}
.member-dialog .member-auth-field input {
  flex: 1;
  width: 0;
  min-width: 0;
  height: 48px;
  margin: 0;
  padding: 10px 12px;
  border: 0;
  border-radius: 0;
  outline: none;
  background: transparent;
  font-size: 16px;
}
.member-password-toggle {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  height: 48px;
  padding: 10px;
  color: #6d8086;
}
.member-dialog .member-remember {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 14px 0 24px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink);
}
.member-dialog .member-remember input {
  flex: 0 0 17px;
  width: 17px;
  height: 17px;
  margin: 3px 0 0;
  padding: 0;
  accent-color: var(--primary);
}
.member-auth-actions .primary {
  flex: 1;
  width: auto;
  min-height: 46px;
  font-size: 15px;
  font-weight: 600;
}
.member-forgot {
  min-height: 46px;
  padding: 10px 16px;
  border: 1px solid #d9e2e6;
  border-radius: 8px;
  color: var(--ink);
  font-size: 14px;
}
.member-forgot:hover {
  background: #f1f5f9;
}
.member-dialog .member-auth-help p {
  font-size: 13px;
  line-height: 1.9;
  margin: 0 0 14px;
}
.member-dialog .member-auth-help p:last-child {
  margin-bottom: 0;
}
.member-auth-help a {
  color: var(--primary);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
.member-auth-actions button:disabled {
  opacity: .6;
  cursor: wait;
}
@media (max-width:400px) {
  .member-auth-header {
    padding: 20px 60px 18px 20px;
  }
  .member-dialog .member-auth-header h2 {
    font-size: 22px;
  }
  .member-auth-body {
    padding: 20px;
  }
  .member-forgot {
    padding: 10px 12px;
  }
  .member-dialog .member-remember {
    font-size: 12px;
  }
}
/* 服務人員聯絡方式：手機／電話分列，分機獨立顯示，自由文字不推測成撥號。 */
.agent-phones {
  margin: 16px 0;
}
.agent-phones>div {
  display: grid;
  grid-template-columns: 3em minmax(0,1fr);
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.7;
}
.agent-phones dt {
  color: var(--muted);
  padding: 0;
}
.agent-phones dd {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  min-width: 0;
}
.agent-number {
  font-size: 14px;
  overflow-wrap: anywhere;
  white-space: pre-line;
  user-select: text;
}
.agent-phones small {
  font-size: 11px;
  color: var(--muted);
}
.agent-phone-action {
  margin-left: auto;
}
.agent-phone-action a,.agent-phone-action button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 5px 10px;
  border: 1px solid #dfb6a9;
  border-radius: 6px;
  color: var(--primary);
  background: white;
  font-size: 12px;
  text-decoration: none;
}
.agent-service-note {
  padding: 12px;
  background: #f1f5f9;
  border-radius: 8px;
  margin: 16px 0;
  overflow-wrap: anywhere;
  white-space: normal;
}
.agent-service-note strong {
  font-size: 12px;
}
#contactDialog .agent-service-note p {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.9;
  white-space: pre-line;
}
.detail-footer-actions .contact-detail {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 11px 8px;
  font-size: 12px;
  text-align: center;
}
#contactDialog .agent-phones {
  margin: 18px 0 24px;
}
#contactDialog .agent-number {
  font-size: 18px;
}
/* 詳情主要操作為聯絡服務人員，完整物件使用外框次要樣式。 */
.detail-footer-actions .detail-link {
  background: #fff;
  color: var(--primary);
  border: 1px solid var(--primary);
}
.detail-footer-actions .contact-detail {
  background: var(--primary);
  color: #fff;
}
/* 手機列表浮於滿版地圖上；底部留出 Google 標誌及版權資訊。 */
@media (max-width:767.98px) {
  .map-shell .panel,.google-active.panel-open .panel,.google-active.panel-open .panel.is-expanded {
    bottom: 28px;
    height: var(--list-sheet-height,46%);
    max-height: var(--list-sheet-height,46%);
    box-shadow: 0 -6px 24px #39393918;
  }
  .google-active.panel-open #googleMap,.google-active.panel-open:has(.panel.is-expanded) #googleMap {
    bottom: 0;
  }
  .map-shell.panel-open .map-tools,.map-shell.panel-open:has(.panel.is-expanded) .map-tools {
    bottom: calc(var(--list-sheet-height,46%) + 28px + 3%);
  }
  .panel-handle {
    height: 28px;
    touch-action: none;
    user-select: none;
    cursor: ns-resize;
    flex-shrink: 0;
  }
  .panel .panel-header {
    top: 28px;
  }
  .panel.is-dragging {
    user-select: none;
  }
}

/* 詳情聯絡列：左側服務人員，右側紅色電話與藍色完整物件。 */
.detail-footer.property-contact-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  padding-bottom: max(12px, env(safe-area-inset-bottom));
  border-top: 1px solid #d4d8dc;
}
.property-contact-agent {
  flex: 1;
  min-width: 0;
  gap: 8px;
}
.property-contact-agent .agent-avatar {
  flex-basis: 40px;
  width: 40px;
  height: 40px;
}
.property-contact-name {
  min-width: 0;
  color: #263241;
}
.property-contact-name strong {
  font-size: 13px;
  text-overflow: ellipsis;
}
.property-contact-name small {
  margin-top: 3px;
  font-size: 10px;
  color: #526b84;
  text-overflow: ellipsis;
}
.property-contact-actions button,.property-contact-actions a {
  min-height: 42px;
  padding: 9px 10px;
  border: 0;
  border-radius: 9px;
  color: #fff;
  font-size: 12px;
  white-space: nowrap;
}
.property-contact-phone {
  background: var(--primary);
}
.property-contact-full {
  background: #28547c;
}
@media (max-width:360px) {
  .detail-footer.property-contact-footer {
    gap: 6px;
    padding-left: 8px;
    padding-right: 8px;
  }
  .property-contact-agent {
    gap: 5px;
  }
  .property-contact-agent .agent-avatar {
    flex-basis: 32px;
    width: 32px;
    height: 32px;
  }
  .property-contact-actions button,.property-contact-actions a {
    padding: 9px 7px;
    font-size: 11px;
  }
}

/* 桌面側欄較窄時分成資訊與按鈕兩列，避免擠出側欄。 */
@media (min-width:768px) {
  .property-detail .property-contact-footer {
    flex-wrap: wrap;
  }
  .property-detail .property-contact-agent {
    flex-basis: 120px;
  }
  .property-detail .property-contact-actions {
    flex: 1 1 auto;
  }
  .property-detail .property-contact-actions button,
  .property-detail .property-contact-actions a {
    flex: 1;
    min-width: 0;
    padding: 9px 7px;
    font-size: 11px;
  }
}

/* Bootstrap btn 共用變數；保留 yes319 品牌紅色與特殊控制尺寸。 */
:root {
  --bs-body-color: #393939;
  --bs-border-width: 1px;
  --bs-border-radius: .375rem;
  --bs-border-radius-sm: .25rem;
  --bs-border-radius-lg: .5rem;
  --bs-link-color: #a52323;
  --bs-link-hover-color: #861c1c;
}
.btn {
  --bs-btn-font-size: .875rem;
  --bs-btn-focus-shadow-rgb: 165,35,35;
}
.btn-primary {
  --bs-btn-bg: #a52323;
  --bs-btn-border-color: #a52323;
  --bs-btn-hover-bg: #861c1c;
  --bs-btn-hover-border-color: #861c1c;
  --bs-btn-active-bg: #741818;
  --bs-btn-active-border-color: #741818;
  --bs-btn-disabled-bg: #a52323;
  --bs-btn-disabled-border-color: #a52323;
}
.btn .fa-solid,.btn .fa-regular,
.header-external-list .fa-solid {
  pointer-events: none;
  line-height: 1;
}
.gallery-tile.btn,.photo-thumbnails .btn,.panel-handle.btn {
  --bs-btn-border-width: 0;
  border-radius: 0;
  padding: 0;
}
.close-dialog .fa-solid,.photo-prev .fa-solid,.photo-next .fa-solid {
  font-size: 22px;
}
.map-tools .fa-solid {
  font-size: 18px;
}
.header-heart-icon {
  font-size: 18px;
  margin-right: 5px;
}
#helpBtn .fa-circle-question {
  font-size: 18px;
  margin-right: 5px;
}
#keywordSearch .search-submit .fa-solid,
.property-contact-actions .fa-solid {
  font-size: 16px;
}
.member-auth-icon .fa-solid,.member-password-toggle .fa-solid {
  font-size: 18px;
}

/* 與原站 yes319main-5.css 的 box-ball 樣式一致。 */
.map-tools .box-ball {
  --bs-btn-color: #fff;
  --bs-btn-bg: rgba(0, 0, 0, .5);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: rgba(0, 0, 0, .9);
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: rgba(0, 0, 0, .9);
  justify-self: center;
  margin-top: 5px;
  width: 50px;
  height: 50px;
  border-radius: 100px;
  box-shadow: 0 0 8px #989898;
  font-size: 12px;
  line-height: 17px;
}
.map-tools > button:not(.box-ball) {
  justify-self: center;
}
.map-tools #mapMemberMenu.is-signed-in {
  --bs-btn-bg: #2db8c1;
  --bs-btn-hover-bg: #2db8c1;
  --bs-btn-active-bg: #2db8c1;
}
@media (min-width: 768px) {
  .map-tools:not(.map-member-tools) {
    bottom: 185px;
  }
  .map-tools {
    overflow: visible;
  }
  .map-shell.panel-open .map-tools .box-ball {
    position: relative;
    z-index: 4;
  }
}
/* 低高度桌面視窗將會員快捷橫排，避免工具組超出地圖頂部。 */
@media (min-width: 768px) and (max-height: 600px) {
  .map-tools:not(.map-member-tools) {
    bottom: 100px;
  }
  .map-member-tools {
    bottom: 35px;
    grid-template-columns: repeat(2, 50px);
    gap: 8px;
  }
}

/* 手機快捷列沿用首頁的按鈕尺寸與配色。 */
.mobile-member-actions {
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid #dce5ed;
  background: #fffffffa;
  box-shadow: 0 -4px 16px #2632410a;
}
.mobile-member-actions .btn {
  --bs-btn-color: #364a61;
  --bs-btn-bg: #f7f9fb;
  --bs-btn-border-color: #dce5ed;
  --bs-btn-hover-color: #364a61;
  --bs-btn-hover-bg: #edf2f7;
  --bs-btn-hover-border-color: #dce5ed;
  --bs-btn-active-color: #364a61;
  --bs-btn-active-bg: #edf2f7;
  --bs-btn-active-border-color: #dce5ed;
  --bs-btn-border-radius: 8px;
  --bs-btn-font-size: 12px;
  --bs-btn-padding-y: 0;
  --bs-btn-padding-x: 0;
  flex: 1;
  min-width: 0;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mobile-member-actions #mobileMemberMenu {
  --bs-btn-color: #fff;
  --bs-btn-bg: #157f82;
  --bs-btn-border-color: #157f82;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #106b6e;
  --bs-btn-hover-border-color: #106b6e;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #0c595b;
  --bs-btn-active-border-color: #0c595b;
}

#mapBrowseHistory {
  --browse-panel-right: 84px;
  --browse-panel-bottom: 16px;
  left: auto;
  right: var(--browse-panel-right);
  bottom: var(--browse-panel-bottom);
  width: min(1040px, calc(100% - var(--browse-panel-right) - 16px));
  height: auto;
  max-height: min(85dvh, calc(100dvh - var(--browse-panel-bottom) - 16px));
  border: 1px solid #dce8e8;
  border-radius: 16px;
  color: #263d40;
  box-shadow: 0 8px 36px #153b3b26;
}
#mapBrowseTitle { font-size: 20px; font-weight: 700; }
#mapBrowseTitle i { color: #168b8c; }
#mapBrowseHistory .browse-account {
  margin-top: 12px;
  font-size: 13px;
  color: #62767a;
}
#mapBrowseHistory .browse-status {
  width: 7px;
  height: 7px;
  margin-right: 6px;
  background: #168b8c;
}
#mapBrowseHistory .browse-logout {
  color: inherit;
  padding: 8px 0 8px 12px;
}
#mapBrowseHistory .browse-logout:focus-visible {
  outline: 3px solid #168b8c;
  outline-offset: 3px;
}
.map-browse-cards {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  /* 保留卡片、定位按鈕及底部留白的高度。 */
  min-height: calc(200px + 4px + 32px + 8px);
  padding-bottom: 8px;
}
.map-browse-card {
  flex: 0 0 150px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.map-browse-card-actions .btn {
  min-height: 32px;
}
.map-browse-preview {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 200px;
  overflow: hidden;
  border: 1px solid #e0e7ee;
  border-radius: 8px;
  background: #fff;
  color: #263241;
}
.map-browse-card .typelabel {
  position: absolute;
  z-index: 2;
  width: 60px;
  margin-top: 1px;
  color: #fff;
  font-size: 14px;
  text-align: center;
}
.map-browse-card .property-card-photo {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background: #f1f5f9;
}
.map-browse-card .property-card-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.map-browse-card .property-card-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 70px;
  padding: 6px 8px;
}
.map-browse-card .property-card-title {
  overflow: hidden;
  font-size: 13px;
  font-weight: 600;
  line-height: 18px;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.map-browse-card .property-card-meta { color: #788698; font-size: 12px; line-height: 18px; }
.map-browse-card .property-card-prices { margin-top: auto; padding-top: 4px; text-align: right; }
.map-browse-card .property-card-price { color: #a52427; font-size: 15px; font-weight: 600; line-height: 20px; }
@media (max-width: 767.98px) {
  #mapBrowseHistory {
    --browse-panel-right: 0px;
    /* 44px 按鈕、上下各 8px、1px 邊框，以及面板與快捷列的 8px 間距。 */
    --browse-panel-bottom: calc(69px + env(safe-area-inset-bottom, 0px));
    width: 100%;
  }
}
