:root {
  --ink: #16202B;
  --ink-soft: #465158;
  --surface: #FFFFFF;
  --bg: #E7EAEA;
  --border: #D6DAD9;
  --accent: #1F5D4C;
  --accent-soft: #E4EEEA;
  --gold: #B8863A;
  --gold-soft: #F4EADA;
  --danger: #B23B3B;
  --cluster-blue: #2F7DE1;
  --badge-monthly: #E3A21A;
  --badge-sale: #C0392B;
  --badge-jeonse: #2E8B57;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(20, 30, 30, 0.08), 0 8px 24px rgba(20, 30, 30, 0.10);
  font-size: 15px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

#app {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

#map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #DDE3E1;
}

.map-status {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: var(--surface);
  padding: 10px 18px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-size: 13px;
  color: var(--ink-soft);
  z-index: 5;
  pointer-events: none;
}
.map-status.hidden { display: none; }

/* ---------------------------------------------------------------- 공통 사이드 패널 */
.side-panel {
  position: absolute;
  top: 0;
  bottom: 0;
  background: var(--surface);
  box-shadow: var(--shadow);
  z-index: 20;
  display: flex;
  flex-direction: column;
}

/* ---------------------------------------------------------------- 왼쪽 필터 패널 */
.filter-panel {
  left: 0;
  width: 340px;
  border-right: 1px solid var(--border);
  transition: transform 0.2s ease;
}
.filter-panel.collapsed { transform: translateX(calc(-100% + 46px)); }
.filter-panel.collapsed .panel-scroll,
.filter-panel.collapsed .filter-footer { opacity: 0; pointer-events: none; }
.filter-panel.collapsed .filter-collapse-btn span { transform: rotate(180deg); }

.panel-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 18px 20px 10px;
  transition: opacity 0.15s ease;
}

.brand-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 10px;
}
.brand-actions {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
}
.brand-mark { font-weight: 700; color: var(--accent); font-size: 14px; }
.brand-name { font-weight: 700; font-size: 17px; color: var(--ink); }
.excel-link {
  border: 1px solid var(--border);
  background: #F7F8F7;
  color: var(--ink-soft);
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
}
.excel-link:hover { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }

.search {
  display: flex;
  align-items: center;
  background: #F1F3F2;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 4px 0 12px;
  margin-bottom: 16px;
}
.search input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  padding: 10px 6px;
  font-size: 13.5px;
  font-family: inherit;
  color: var(--ink);
  outline: none;
}
.search input::placeholder { color: #8A9592; }
.search button {
  border: none;
  background: transparent;
  color: var(--ink-soft);
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.search button:hover { background: #E4E8E7; color: var(--accent); }

.tabs-underline {
  display: flex;
  gap: 22px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
}
.tabs-underline .tab {
  border: none;
  background: none;
  padding: 4px 0 12px;
  font-size: 15.5px;
  font-weight: 600;
  color: #A2ACA9;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
}
.tabs-underline .tab .cnt { font-size: 11px; font-weight: 500; opacity: .7; margin-left: 2px; }
.tabs-underline .tab.on { color: var(--ink); border-bottom-color: var(--ink); }

.filter-block { margin-bottom: 22px; }
.filter-block-label { font-size: 13.5px; font-weight: 700; color: var(--ink); margin-bottom: 3px; }
.filter-block-sub { font-size: 11.5px; color: #8A9592; margin-bottom: 10px; }
.slider-readout { font-size: 12.5px; color: var(--ink-soft); margin-bottom: 10px; font-variant-numeric: tabular-nums; }
.slider-readout span { font-weight: 700; color: var(--accent); }

.range-num-inputs { display: flex; align-items: center; gap: 6px; margin-top: 10px; }
.range-num-inputs input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 7px 8px;
  font-size: 12.5px;
  font-family: inherit;
  font-variant-numeric: tabular-nums;
}
.range-num-inputs span { color: #A2ACA9; font-size: 12px; }

select#sortSelect {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 9px 8px;
  font-size: 13px;
  font-family: inherit;
  color: var(--ink);
  background: #fff;
}

.filter-footer {
  display: flex;
  gap: 8px;
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  transition: opacity 0.15s ease;
}
.btn {
  flex: 1;
  border: none;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { background: #184a3d; }
.btn.ghost { background: #F1F3F2; color: var(--ink-soft); }
.btn.ghost:hover { background: #E4E8E7; }

.filter-collapse-btn {
  border: none;
  border-top: 1px solid var(--border);
  background: var(--ink);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  padding: 11px 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.filter-collapse-btn span { display: inline-block; transition: transform 0.2s ease; font-size: 10px; }

/* ---------------------------------------------------------------- 듀얼 슬라이더 */
.dual-slider {
  position: relative;
  height: 28px;
}
.dual-slider .track {
  position: absolute;
  top: 12px;
  left: 0;
  right: 0;
  height: 4px;
  background: #E4E8E7;
  border-radius: 2px;
}
.dual-slider .fill {
  position: absolute;
  top: 12px;
  height: 4px;
  background: var(--accent);
  border-radius: 2px;
}
.dual-slider input[type="range"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  margin: 0;
  height: 28px;
  background: none;
  pointer-events: none;
  appearance: none;
  -webkit-appearance: none;
}
.dual-slider input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  pointer-events: auto;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--surface);
  border: 2.5px solid var(--accent);
  cursor: pointer;
  margin-top: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}
.dual-slider input[type="range"]::-moz-range-thumb {
  pointer-events: auto;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--surface);
  border: 2.5px solid var(--accent);
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}
.dual-slider input[type="range"]::-webkit-slider-runnable-track { background: none; }
.dual-slider input[type="range"]::-moz-range-track { background: none; }

/* ---------------------------------------------------------------- 옵션 그리드 */
.option-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.option-grid .chip {
  border: 1px solid var(--border);
  background: #F7F8F7;
  padding: 10px 8px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
  text-align: center;
}
.option-grid .chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.option-grid .chip-cat { border-left: 4px solid var(--cat-color, var(--accent)); }
.option-grid .chip-cat.on { background: var(--cat-color, var(--accent)); border-color: var(--cat-color, var(--accent)); color: #fff; }

/* ---------------------------------------------------------------- 오른쪽 리스트 패널 */
.list-panel {
  right: 0;
  width: 380px;
  border-left: 1px solid var(--border);
}
.list-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.list-panel-head select {
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 8px 10px;
  font-size: 13px;
  font-family: inherit;
  color: var(--ink);
  background: #fff;
  min-width: 100px;
}
.list-count { font-size: 12.5px; color: var(--ink-soft); white-space: nowrap; }
.list-count b { color: var(--accent); font-size: 15px; margin-right: 1px; }

.list-items {
  list-style: none;
  margin: 0;
  padding: 10px;
  overflow-y: auto;
  flex: 1;
}

.listing-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  margin-bottom: 12px;
  background: var(--surface);
}
.listing-card:hover { border-color: var(--accent); }
.listing-card.active { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }

.listing-thumb {
  width: 100%;
  height: 150px;
  background: #E4E8E7 center/cover no-repeat;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #A2ACA9;
  font-size: 11px;
}
.listing-heart {
  position: absolute;
  top: 8px; right: 8px;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: rgba(20,30,30,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 13px;
  cursor: pointer;
  border: none;
}
.listing-heart.on { color: #FF5A6E; background: rgba(255,255,255,0.9); }

.listing-body { padding: 12px 14px 14px; }
.listing-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.listing-badges { display: flex; gap: 5px; margin-left: auto; }
.listing-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--ink);
  color: #fff;
}
.listing-badge.sale { background: var(--badge-sale); }
.listing-badge.jeonse { background: var(--badge-jeonse); }
.listing-badge.monthly { background: var(--badge-monthly); color: #3A2B00; }

.listing-price {
  font-weight: 700;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  margin-bottom: 6px;
}
.listing-area-line {
  font-size: 12.5px;
  color: var(--ink-soft);
  display: flex;
  justify-content: space-between;
}
.listing-area-line span:first-child { color: #8A9592; }

.list-empty {
  text-align: center;
  color: #A2ACA9;
  font-size: 13px;
  padding: 40px 20px;
}

/* ---------------------------------------------------------------- 상세 패널 */
.detail-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  width: 420px;
  max-width: 100vw;
  background: var(--surface);
  box-shadow: -8px 0 30px rgba(20,30,30,0.18);
  transform: translateX(100%);
  transition: transform 0.25s ease;
  overflow-y: auto;
}
.detail-panel.open { transform: translateX(0); }

.detail-close {
  position: sticky;
  top: 12px;
  left: 100%;
  transform: translateX(-44px);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 18px;
  color: var(--ink-soft);
  cursor: pointer;
  z-index: 2;
}

.detail-body { padding: 0 22px 30px; margin-top: -32px; }

.detail-gallery {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  margin: 0 -22px 16px;
  padding: 0 22px;
  scroll-snap-type: x mandatory;
}
.detail-gallery img {
  width: 100%;
  max-width: 376px;
  height: 240px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
  scroll-snap-align: start;
  cursor: zoom-in;
  background: #E4E8E7;
}
.detail-gallery.empty {
  height: 160px;
  border-radius: 8px;
  background: #EEF1F0;
  align-items: center;
  justify-content: center;
  color: #A2ACA9;
  font-size: 13px;
}

.detail-badges { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }

.detail-title { font-size: 17px; font-weight: 700; margin: 0 0 2px; }
.detail-address { font-size: 13px; color: var(--ink-soft); margin: 0 0 18px; }

.detail-price-block {
  background: var(--gold-soft);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 18px;
}
.detail-price-row {
  display: flex;
  justify-content: space-between;
  font-size: 13.5px;
  padding: 3px 0;
  color: var(--ink-soft);
}
.detail-price-row b {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.detail-price-row.main {
  font-size: 18px;
  font-weight: 700;
  color: var(--gold);
}
.detail-price-row.main b { color: var(--gold); font-size: 20px; }

.detail-section { margin-bottom: 20px; }
.detail-section h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
}
.detail-grid div { font-size: 12.5px; color: #8A9592; }
.detail-grid div b { display: block; font-size: 13.5px; color: var(--ink); font-weight: 600; margin-top: 2px; }

.detail-options { display: flex; flex-wrap: wrap; gap: 6px; }
.detail-options span {
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.detail-desc {
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--ink-soft);
  white-space: pre-wrap;
}

.agent-card {
  background: #F7F8F7;
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 13px;
}
.agent-card div { display: flex; justify-content: space-between; padding: 3px 0; color: var(--ink-soft); }
.agent-card div b { color: var(--ink); font-weight: 600; }

/* ---------------------------------------------------------------- 마커 / 클러스터 */
.cluster-badge {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--cluster-blue);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(47,125,225,0.45);
  border: 2px solid #fff;
}
.pin {
  position: relative;
  min-width: 58px;
  padding: 5px 10px 7px;
  border-radius: 8px;
  background: var(--cat-color, var(--accent));
  color: #fff;
  font-size: 11.5px;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(20,30,30,0.28);
  white-space: nowrap;
  text-align: center;
  line-height: 1.35;
}
.pin::after {
  content: "";
  position: absolute;
  left: 14px;
  bottom: -6px;
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid var(--cat-color, var(--accent));
}
.pin .pin-trade { display: block; font-size: 10px; font-weight: 700; opacity: 0.85; letter-spacing: 0.02em; }
.pin .pin-price { display: block; font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
.pin .pin-exclusivity {
  display: block;
  margin: -5px -10px 4px;
  padding: 3px 0;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  border-radius: 7px 7px 0 0;
}
.pin .pin-contract {
  display: block;
  margin: 4px -10px -7px;
  padding: 3px 0;
  background: #D93025;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  border-radius: 0 0 7px 7px;
}
.pin.active { outline: 2px solid var(--ink); outline-offset: 1px; }

/* ---------------------------------------------------------------- 즐겨찾기 */
.fav-popover {
  position: fixed;
  z-index: 90;
  display: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 10px;
  width: 200px;
}
.fav-popover.open { display: block; }
.fav-popover .fav-group-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 4px;
  font-size: 12.5px;
  cursor: pointer;
  border-radius: 6px;
}
.fav-popover .fav-group-item:hover { background: #F1F3F2; }
.fav-popover .fav-group-item input { pointer-events: none; }
.fav-popover .fav-new-row {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.fav-popover .fav-new-row input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 7px;
  font-size: 12px;
  font-family: inherit;
}
.fav-popover .fav-new-row button {
  border: none;
  background: var(--accent);
  color: #fff;
  border-radius: 6px;
  padding: 0 10px;
  font-size: 12px;
  cursor: pointer;
}

.fav-group-block { margin-bottom: 18px; }
.fav-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.fav-group-head h4 { margin: 0; font-size: 14px; color: var(--ink); }
.fav-group-head .fav-group-actions button {
  border: none;
  background: none;
  color: #8A9592;
  font-size: 12px;
  cursor: pointer;
  margin-left: 8px;
}
.fav-group-head .fav-group-actions button:hover { color: var(--danger); }
.fav-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 6px;
  cursor: pointer;
  font-size: 12.5px;
}
.fav-item-row:hover { border-color: var(--accent); }
.fav-item-row button {
  border: none;
  background: none;
  color: var(--danger);
  font-size: 16px;
  cursor: pointer;
}
.fav-empty { color: #A2ACA9; font-size: 13px; text-align: center; padding: 20px; }

/* ---------------------------------------------------------------- 라이트박스 */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10,14,17,0.9);
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 90vh; border-radius: 6px; }
.lightbox-close {
  position: absolute;
  top: 20px; right: 24px;
  background: none;
  border: none;
  color: #fff;
  font-size: 30px;
  cursor: pointer;
}

/* ---------------------------------------------------------------- 엑셀 불러오기 모달 */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,14,17,0.55);
  z-index: 80;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
  overflow-y: auto;
}
.modal-overlay.open { display: flex; }

.modal-box {
  background: var(--surface);
  border-radius: 12px;
  width: 640px;
  max-width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  overflow: hidden;
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.modal-head h3 { margin: 0; font-size: 16px; }
.modal-body { padding: 20px; }
.modal-desc { font-size: 13px; color: var(--ink-soft); margin: 0 0 14px; }
.modal-status { font-size: 12.5px; color: var(--ink-soft); margin-top: 10px; min-height: 16px; }

.file-drop {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 140px;
  border: 1.5px dashed var(--border);
  border-radius: 10px;
  color: var(--ink-soft);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  background: #F7F8F7;
}
.file-drop:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

.map-toolbar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}
.map-toolbar label { display: block; font-size: 12px; color: var(--ink-soft); font-weight: 600; margin-bottom: 5px; }
.map-toolbar select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px;
  font-family: inherit;
  font-size: 13px;
}

.map-scroll { max-height: 46vh; overflow-y: auto; border-top: 1px solid var(--border); padding-top: 10px; }

.map-group { margin-bottom: 16px; }
.map-group h4 {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 8px;
}
.map-row {
  display: grid;
  grid-template-columns: 130px 1fr 130px;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
}
.map-label { font-size: 12.5px; color: var(--ink); }
.map-label .req { color: var(--danger); margin-left: 3px; }
.map-select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 6px;
  font-size: 12.5px;
  font-family: inherit;
}
.map-sample {
  font-size: 11.5px;
  color: #8A9592;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.merge-group { border-top: 1px dashed var(--border); padding-top: 12px; }
.merge-toggle { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--ink); cursor: pointer; }
.merge-row { display: flex; flex-direction: column; gap: 4px; margin: 10px 0; }
.merge-row span { font-size: 11.5px; color: var(--ink-soft); }
.merge-row select { border: 1px solid var(--border); border-radius: 6px; padding: 7px; font-family: inherit; font-size: 12.5px; }
.merge-field-row { display: grid; grid-template-columns: 1fr auto 1fr auto; align-items: center; gap: 6px; margin: 6px 0; }
.merge-field-row select { border: 1px solid var(--border); border-radius: 6px; padding: 6px; font-family: inherit; font-size: 12.5px; }
.merge-remove { border: none; background: none; color: var(--danger); font-size: 16px; cursor: pointer; }
.merge-badge { font-size: 10.5px; color: var(--accent); background: var(--accent-soft); padding: 2px 6px; border-radius: 4px; }

.btn.small { flex: none; padding: 6px 12px; font-size: 12px; margin-top: 6px; }

.lf-image-gallery { display: flex; flex-wrap: wrap; gap: 8px; }
.lf-image-thumb { position: relative; width: 72px; height: 72px; border-radius: 6px; overflow: hidden; border: 1px solid var(--border); }
.lf-image-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lf-image-remove {
  position: absolute;
  top: 2px; right: 2px;
  width: 18px; height: 18px;
  border-radius: 50%;
  border: none;
  background: rgba(20,30,30,0.7);
  color: #fff;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.apply-result h4 { margin: 0 0 6px; font-size: 16px; color: var(--accent); }
.apply-cat-list { list-style: none; margin: 12px 0 0; padding: 0; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.apply-cat-list li { display: flex; justify-content: space-between; padding: 9px 14px; font-size: 13px; border-bottom: 1px solid var(--border); }
.apply-cat-list li:last-child { border-bottom: none; }
.apply-cat-list li b { color: var(--ink); }

/* ---------------------------------------------------------------- 반응형 */
@media (max-width: 900px) {
  .filter-panel { width: 84vw; max-width: 340px; }
  .list-panel { width: 100vw; left: 0; right: 0; top: auto; bottom: 0; height: 42vh; border-left: none; border-top: 1px solid var(--border); }
  .detail-panel { width: 100vw; }
  .map-toolbar { grid-template-columns: 1fr; }
  .map-row { grid-template-columns: 1fr; }
  .map-sample { display: none; }
}

/* ---------------------------------------------------------------- 모바일 전용 동작 (필터 왼쪽으로 숨김 / 하단 리스트 접기) */
.mobile-filter-toggle { display: none; }

@media (max-width: 760px) {
  .mobile-filter-toggle {
    display: flex;
    position: fixed;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    z-index: 26;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 56px;
    border: none;
    border-radius: 0 10px 10px 0;
    background: var(--ink);
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 2px 0 8px rgba(0,0,0,0.25);
  }

  .filter-panel {
    width: 86vw;
    max-width: 340px;
    transform: translateX(-100%);
    transition: transform 0.28s ease;
    z-index: 24;
  }
  .filter-panel.mobile-open { transform: translateX(0); }
  .filter-panel.collapsed { transform: translateX(-100%); } /* 데스크톱용 접힘 상태는 모바일에서 완전히 숨김으로 통일 */
  .filter-panel .filter-collapse-btn { display: none; } /* 모바일은 화살표 버튼 하나로 통일 */

  .list-panel {
    height: 42vh;
    transition: height 0.22s ease;
  }
  .list-panel.mobile-collapsed { height: 40px; overflow: hidden; }
  .list-panel-handle {
    display: block;
    width: 44px;
    height: 5px;
    border-radius: 3px;
    background: var(--border);
    margin: 8px auto 0;
    cursor: pointer;
  }
}

.list-panel-handle { display: none; }


.pin .pin-contract.pin-contract-done {
  background: #111;
}
.pin .pin-contract.pin-contract-progress {
  background: #D93025;
}
