/* ---------- App layout, components and dark mode ---------- */

:root{
  --rail-w: 288px;
  --header-h: 96px;
  --max-w: 1640px;
}

/* dark mode (applied to <html data-theme="dark">) */
html[data-theme="dark"]{
  --bg: #0c1517;
  --surface: #131e21;
  --surface-2: #182428;
  --surface-sunken: #0f1a1d;
  --border: #233238;
  --border-strong: #2d4047;
  --text: #e7eff1;
  --text-2: #95a8af;
  --text-3: #647981;

  --accent: #56c2d6;
  --accent-hover: #79d2e3;
  --accent-press: #2da4ba;
  --accent-tint: #15333a;
  --accent-tint-2: #1b4651;
  --accent-ink: #c8eaf1;

  --success: #5cc28d;
  --success-tint: #133024;
  --success-ink: #b6e7cb;
  --warn: #d99a4e;
  --warn-tint: #2e2210;
  --danger: #e07a6f;
  --danger-tint: #2a1513;
  --danger-ink: #f0c2bc;

  --sh-sm: 0 1px 2px rgba(0,0,0,.45);
  --sh-md: 0 4px 14px rgba(0,0,0,.35), 0 1px 3px rgba(0,0,0,.4);
  --sh-lg: 0 18px 48px rgba(0,0,0,.55), 0 4px 12px rgba(0,0,0,.4);
}

/* shell */
.app{
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
}

/* ============================================================
   HEADER
   ============================================================ */
.appbar{
  position: sticky; top:0; z-index: 30;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 14px 28px 0;
}
.appbar__row1{
  display:flex; align-items:center; gap: 18px;
  flex-wrap: wrap;
}
.brand{
  display:flex; align-items:center; gap: 10px;
  font-family: var(--font-display);
  font-size: 20px; letter-spacing: -0.02em;
  color: var(--text);
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}
.brand__mark{
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--accent-press));
  display:grid; place-items:center; color: white;
  font-weight: 700; font-size: 14px;
  font-family: var(--font-display);
  letter-spacing: 0;
}
.brand__tag{
  font-family: var(--font-body); font-size: 10.5px;
  color: var(--text-3);
  text-transform: uppercase; letter-spacing: 0.16em;
  font-weight: 500;
  border-left: 1px solid var(--border);
  padding-left: 12px;
  margin-left: 2px;
}

.meta{
  display:flex; align-items:center; gap: 12px;
  color: var(--text-2); font-size: 13.5px;
  flex-shrink: 0;
}
.meta__count{
  font-family: var(--font-display);
  font-size: 22px; line-height: 1;
  color: var(--text);
  font-weight: 600;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.meta__count em{
  color: var(--text-3); font-style: normal; font-weight: 400;
  font-size: 14px; margin-left: 4px;
}
.meta__sync{
  display:inline-flex; align-items:center; gap: 7px;
  padding: 4px 10px 4px 8px;
  background: var(--success-tint); color: var(--success-ink);
  border-radius: var(--r-pill);
  font-size: 12px;
  white-space: nowrap;
}
.meta__sync::before{
  content: ""; width: 6px; height: 6px; border-radius:50%;
  background: var(--success);
  animation: pulseDot 1.8s infinite;
}

.chips{
  display:flex; gap:6px; flex-wrap: wrap;
  margin-left: auto;
  justify-content: flex-end;
}
.chip{
  display:inline-flex; align-items:center; gap:6px;
  padding: 5px 11px;
  background: var(--accent-tint);
  color: var(--accent-ink);
  border-radius: var(--r-pill);
  font-size: 12.5px;
  font-weight: 500;
  border: 1px solid var(--accent-tint-2);
}
.chip__k{ color: var(--accent); font-weight:600; }

.appbar__row2{
  display:flex; align-items:center; gap: 16px;
  padding: 12px 0 14px;
  grid-column: 1 / -1;
}

.search{
  position: relative; flex: 1; max-width: 560px;
}
.search input{
  width: 100%;
  height: 40px;
  padding: 0 14px 0 40px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  background: var(--surface-2);
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: box-shadow .15s, border-color .15s;
}
.search input:focus{
  border-color: var(--accent);
  box-shadow: var(--sh-focus);
  background: var(--surface);
}
.search svg{
  position: absolute; left: 13px; top: 12px;
  color: var(--text-3);
}
.search kbd{
  position:absolute; right: 10px; top: 9px;
  padding: 2px 6px;
  background: var(--surface);
  color: var(--text-3);
  border: 1px solid var(--border);
  border-radius: 5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
}

.sort-select{
  height: 40px;
  padding: 0 36px 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  background: var(--surface-2);
  color: var(--text);
  font-size: 13.5px;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path d='M2 4l4 4 4-4' stroke='%2354666d' stroke-width='1.5' fill='none' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
}

.view-toggle{
  display:inline-flex; padding: 3px;
  background: var(--surface-sunken);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}
.view-toggle button{
  border: none; background: transparent;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 13px; color: var(--text-2);
  display:inline-flex; align-items:center; gap:6px;
  cursor: pointer;
  font-weight: 500;
}
.view-toggle button.on{
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--sh-sm);
}

/* ============================================================
   MAIN
   ============================================================ */
.main{
  display: grid;
  grid-template-columns: var(--rail-w) 1fr;
  min-height: 0;
}

/* ============================================================
   FILTER RAIL
   ============================================================ */
.rail{
  position: sticky;
  top: var(--header-h);
  align-self: start;
  height: calc(100vh - var(--header-h));
  overflow-y: auto;
  border-right: 1px solid var(--border);
  background: var(--surface);
  padding: 22px 22px 100px;
}
.rail__head{
  display:flex; align-items:baseline; justify-content: space-between;
  margin-bottom: 6px;
}
.rail__title{
  font-family: var(--font-display);
  font-size: 17px; letter-spacing: -0.01em;
  font-weight: 600;
  color: var(--text);
}
.rail__count{ font-size: 12px; color: var(--text-2); }
.rail__reset{
  background:none; border:none; color: var(--accent);
  font-size: 12.5px; cursor: pointer; padding: 0;
  text-decoration: underline; text-underline-offset: 3px;
  text-decoration-color: var(--accent-tint-2);
}
.rail__reset:hover{ text-decoration-color: var(--accent); }

.fs{ /* filter section */
  padding: 18px 0;
  border-top: 1px solid var(--border);
}
.fs:first-of-type{ border-top: none; padding-top: 14px;}
.fs__label{
  display:flex; align-items:center; justify-content: space-between;
  font-size: 11.5px; font-weight: 600;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 12px;
}
.fs__value{
  font-family: var(--font-display);
  font-size: 13px; color: var(--text);
  font-weight: 500;
  letter-spacing: -0.01em;
  text-transform: none;
}

/* range slider (dual-thumb visualization) */
.range{
  position: relative; height: 28px;
  margin: 2px 0 4px;
}
.range__track{
  position:absolute; left:0; right:0; top: 12px;
  height: 4px; border-radius:2px;
  background: var(--surface-sunken);
}
.range__fill{
  position:absolute; top:12px; height: 4px; border-radius:2px;
  background: var(--accent);
}
.range input{
  position: absolute; left:0; right:0; top:6px;
  width: 100%;
  height: 16px;
  appearance: none; background: transparent;
  pointer-events: none;
  margin:0;
}
.range input::-webkit-slider-thumb{
  pointer-events: auto;
  appearance: none;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--accent);
  box-shadow: var(--sh-sm);
  cursor: grab;
}
.range input::-moz-range-thumb{
  pointer-events: auto;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--accent);
  box-shadow: var(--sh-sm);
  cursor: grab;
}
.range__bounds{
  display:flex; justify-content: space-between;
  font-size: 11px; color: var(--text-3);
  margin-top: 2px;
}

/* chip-style multi-select for beds/baths */
.chiprow{ display:flex; gap: 6px; flex-wrap: wrap;}
.chiprow button{
  min-width: 36px; height: 32px;
  padding: 0 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all .12s;
  font-variant-numeric: tabular-nums;
}
.chiprow button:hover{ border-color: var(--accent); color: var(--text); }
.chiprow button.on{
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

/* toggle row */
.toggle{
  display:flex; align-items:center; justify-content: space-between;
  padding: 6px 0;
  cursor: pointer;
  user-select: none;
}
.toggle__label{ font-size: 13.5px; color: var(--text);}
.toggle__sw{
  width: 32px; height: 18px; border-radius: 9px;
  background: var(--border-strong);
  position: relative; transition: background .15s;
  flex-shrink: 0;
}
.toggle__sw::after{
  content:''; position: absolute;
  width: 14px; height: 14px; border-radius: 50%;
  background: white; top:2px; left:2px;
  transition: left .15s, transform .15s;
  box-shadow: 0 1px 2px rgba(0,0,0,.2);
}
.toggle.on .toggle__sw{ background: var(--accent);}
.toggle.on .toggle__sw::after{ left: 16px;}

/* checkbox list (multi neighbourhood/type) */
.checklist{ display:flex; flex-direction: column; gap: 2px; max-height: 240px; overflow-y: auto; margin: 0 -4px; padding: 2px 4px;}
.checkitem{
  display:flex; align-items:center; gap: 10px;
  padding: 6px 6px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
}
.checkitem:hover{ background: var(--surface-sunken);}
.checkitem__box{
  width: 16px; height: 16px;
  border-radius: 4px;
  border: 1.5px solid var(--border-strong);
  flex-shrink:0;
  display:grid; place-items:center;
  background: var(--surface);
  transition: all .12s;
}
.checkitem.on .checkitem__box{
  background: var(--accent);
  border-color: var(--accent);
}
.checkitem.on .checkitem__box::after{
  content: '';
  width: 9px; height: 5px;
  border-left: 2px solid white;
  border-bottom: 2px solid white;
  transform: rotate(-45deg) translate(1px, -1px);
}
.checkitem__count{
  margin-left: auto;
  font-size: 11.5px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   CONTENT (Grid)
   ============================================================ */
.content{ padding: 20px 28px 60px; min-width: 0; }
.results-bar{
  display:flex; justify-content: space-between; align-items:center;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.results-bar__txt{ font-size: 13.5px; color: var(--text-2);}
.results-bar__txt b{ color: var(--text); font-weight: 600;}

.grid{
  display: grid;
  grid-template-columns: repeat(var(--cols, 4), 1fr);
  gap: 20px;
}
.grid--compact{ --cols: 5; }
.grid--cozy{ --cols: 4; }
.grid--comfy{ --cols: 3; }

/* ============================================================
   LISTING CARD
   ============================================================ */
.card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  cursor: pointer;
  transition: transform .18s cubic-bezier(.2,.7,.3,1), box-shadow .18s, border-color .18s;
  display: flex; flex-direction: column;
  position: relative;
  animation: fadeUp .35s cubic-bezier(.2,.7,.3,1) both;
}
.card:hover{
  transform: translateY(-3px);
  box-shadow: var(--sh-md);
  border-color: var(--border-strong);
}
.card.is-delisted{
  opacity: 0.66;
}
.card.is-delisted .card__photo::after{
  content: ''; position: absolute; inset:0;
  background: rgba(20, 37, 43, 0.25);
}

.card__photo{
  position: relative;
  aspect-ratio: 16/10;
  background: var(--surface-sunken);
  overflow: hidden;
}
.card__photo img{
  width:100%; height:100%; object-fit: cover;
  display:block;
  transition: transform .4s cubic-bezier(.2,.7,.3,1);
}
.card:hover .card__photo img{ transform: scale(1.04);}
.card__photo-fallback{
  position:absolute; inset:0;
  display:grid; place-items:center;
  color: var(--text-3); font-size: 11px;
  font-family: ui-monospace, monospace;
  background: repeating-linear-gradient(45deg, var(--surface-sunken) 0 10px, var(--surface-2) 10px 20px);
}

.card__photo-badge{
  position: absolute; top: 10px; right: 10px;
  background: rgba(20, 37, 43, 0.78);
  color: white;
  padding: 4px 9px;
  border-radius: var(--r-pill);
  font-size: 11.5px;
  font-weight: 500;
  display:inline-flex; align-items:center; gap: 5px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.card__ribbon{
  position: absolute; top: 12px; left: -28px;
  transform: rotate(-32deg);
  background: var(--text);
  color: white;
  padding: 4px 32px;
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
}

.card__type{
  position: absolute; top: 10px; left: 10px;
  background: rgba(15, 25, 30, .78);
  color: #fff;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
}

.card__body{
  padding: 14px 16px 16px;
  display:flex; flex-direction: column;
  gap: 10px;
  flex: 1;
}

.card__pricerow{
  display:flex; align-items: baseline; justify-content: space-between;
  gap: 10px;
}
.card__price{
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
}
.card__price em{
  font-style: normal;
  font-size: 13px;
  color: var(--text-3);
  font-weight: 400;
  letter-spacing: 0;
  margin-left: 2px;
  font-family: var(--font-body);
}
.delta{
  display:inline-flex; align-items:center; gap: 3px;
  padding: 3px 8px;
  border-radius: var(--r-pill);
  font-size: 11.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  position: relative;
  cursor: help;
}
.delta--down{ background: var(--success-tint); color: var(--success-ink); }
.delta--up{ background: var(--danger-tint); color: var(--danger-ink); }
.delta__tip{
  position: absolute;
  bottom: calc(100% + 6px);
  right: 0;
  background: var(--text);
  color: white;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 11px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s;
  font-weight: 400;
  box-shadow: var(--sh-md);
}
.delta__tip::after{
  content:''; position:absolute; top:100%; right: 12px;
  border: 4px solid transparent; border-top-color: var(--text);
}
.delta:hover .delta__tip{ opacity: 1;}

.card__specs{
  display:flex; gap: 6px;
  color: var(--text-2);
  font-size: 13px;
  align-items: center;
  font-variant-numeric: tabular-nums;
}
.card__specs span{ display:inline-flex; align-items:center; gap: 4px;}
.card__specs .sep{
  width: 3px; height: 3px;
  background: var(--text-3);
  border-radius: 50%;
  display: inline-block;
}

.card__badges{
  display:flex; gap: 5px; flex-wrap: wrap;
}
.tag{
  font-size: 11px;
  padding: 3px 8px;
  border-radius: var(--r-pill);
  font-weight: 500;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  white-space: nowrap;
}
.tag--water{ background: #e8f1f7; color: #1a4d7a; border-color: #d4e5f0;}
.tag--neutral{ background: var(--surface-sunken); color: var(--text-2); border-color: var(--border);}
.tag--premium{ background: #fbf3df; color: #7a5a13; border-color: #f1e3b8; }
.tag--furnished{ background: var(--accent-tint); color: var(--accent-ink); border-color: var(--accent-tint-2);}
html[data-theme="dark"] .tag--water{ background: #143042; color: #a8d2ec; border-color: #1d4258;}
html[data-theme="dark"] .tag--premium{ background: #2a2210; color: #e5c97a; border-color: #3a2f15;}
html[data-theme="dark"] .tag--neutral{ background: #232b30; color: #c3cfd5; border-color: #2e3940;}
html[data-theme="dark"] .tag--furnished{ background: #15323b; color: #97cad8; border-color: #1c4250;}

.card__loc{
  display:flex; align-items: center; justify-content: space-between;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
  font-size: 12.5px;
  color: var(--text-2);
}
.card__loc__hood{
  display:inline-flex; align-items:center; gap: 5px;
  color: var(--text-2);
}
.card__loc__date{
  font-size: 11.5px; color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty{
  padding: 80px 20px;
  text-align: center;
  color: var(--text-2);
}
.empty h3{
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--text);
  margin: 14px 0 6px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.empty p{ margin: 0 0 18px; font-size: 14px;}
.empty button{
  border: 1px solid var(--accent);
  color: var(--accent);
  background: transparent;
  padding: 8px 18px;
  border-radius: var(--r-md);
  font-size: 13px; font-weight: 500;
  cursor: pointer;
}
.empty button:hover{ background: var(--accent-tint); }

/* ============================================================
   MAP VIEW
   ============================================================ */
.mapwrap{
  height: calc(100vh - var(--header-h) - 40px);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--surface-sunken);
  position: relative;
}
.leaflet-container{
  background: var(--surface-sunken) !important;
  font-family: var(--font-body) !important;
}
html[data-theme="dark"] .leaflet-tile-pane{
  filter: brightness(0.7) invert(0.92) contrast(0.95) hue-rotate(180deg) saturate(0.4);
}
.price-marker{
  background: var(--surface);
  border: 1.5px solid var(--accent);
  color: var(--accent-ink);
  padding: 5px 10px;
  border-radius: var(--r-pill);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 12.5px;
  white-space: nowrap;
  box-shadow: var(--sh-md);
  cursor: pointer;
  transform: translate(-50%, -50%);
  display: inline-block;
  font-variant-numeric: tabular-nums;
}
.price-marker.is-active{
  background: var(--accent);
  color: white;
  transform: translate(-50%, -50%) scale(1.08);
  z-index: 1000;
}
.price-marker.is-delisted{
  border-color: var(--border-strong);
  color: var(--text-3);
  background: var(--surface-2);
  text-decoration: line-through;
}
.minicard{
  background: var(--surface);
  border-radius: var(--r-md);
  overflow: hidden;
  width: 240px;
  box-shadow: var(--sh-lg);
}
.minicard img{ width:100%; height: 130px; object-fit: cover; display: block;}
.minicard__body{ padding: 12px;}
.minicard__price{
  font-family: var(--font-display);
  font-size: 17px; font-weight: 600; letter-spacing: -0.01em;
  color: var(--text);
}
.minicard__title{
  font-size: 12.5px; color: var(--text-2);
  margin: 4px 0;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical;
  overflow:hidden;
}
.minicard__cta{
  margin-top: 6px;
  font-size: 12px;
  color: var(--accent);
  font-weight: 500;
}

.leaflet-popup-content-wrapper{
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  border-radius: var(--r-md) !important;
}
.leaflet-popup-content{ margin: 0 !important; }
.leaflet-popup-tip{ background: var(--surface) !important; }
.leaflet-popup-close-button{ display:none !important; }

/* ============================================================
   DETAIL MODAL
   ============================================================ */
.modal-backdrop{
  position: fixed; inset:0; z-index: 100;
  background: rgba(12, 21, 23, 0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  display: grid;
  place-items: center;
  padding: 40px;
  animation: fadein .15s;
}
@keyframes fadein{ from{ opacity: 0;} to{opacity:1;}}
.modal{
  background: var(--surface);
  border-radius: var(--r-xl);
  width: 100%;
  max-width: 1080px;
  max-height: calc(100vh - 80px);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr auto;
  box-shadow: var(--sh-lg);
  animation: fadeUp .25s cubic-bezier(.2,.7,.3,1) both;
}
.modal__hd{
  display:flex; align-items: center; justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
}
.modal__ref{
  display:flex; gap: 14px; align-items: baseline;
  color: var(--text-3); font-size: 12px;
  font-family: ui-monospace, monospace;
}
.modal__ref b{
  color: var(--text); font-weight: 500;
  font-family: var(--font-body);
  font-size: 13px;
}
.modal__close{
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-2);
  cursor: pointer;
  display:grid; place-items:center;
}
.modal__close:hover{ background: var(--surface-sunken); color: var(--text);}

.modal__body{
  overflow-y: auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 0;
}
.modal__left{ padding: 24px; border-right: 1px solid var(--border);}
.modal__right{ padding: 24px; background: var(--surface-2);}

.carousel{
  position: relative;
  aspect-ratio: 16/10;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--surface-sunken);
}
.carousel img{ width:100%; height:100%; object-fit:cover;}
.carousel__nav{
  position:absolute; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px;
  background: rgba(255,255,255,.92);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display:grid; place-items:center;
  color: var(--text);
  box-shadow: var(--sh-md);
}
.carousel__nav--prev{ left: 14px;}
.carousel__nav--next{ right: 14px;}
.carousel__dots{
  position: absolute; bottom: 14px; left:50%; transform: translateX(-50%);
  display:flex; gap: 5px;
  background: rgba(20,37,43,.5);
  padding: 5px 10px; border-radius: var(--r-pill);
  backdrop-filter: blur(6px);
}
.carousel__dots span{
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255,255,255,.4);
  transition: background .15s, width .15s;
  cursor: pointer;
}
.carousel__dots span.on{ background: white; width: 14px; border-radius: 3px;}

.thumbs{
  display:flex; gap: 6px;
  margin-top: 10px;
  overflow-x: auto;
}
.thumbs button{
  flex: 0 0 78px;
  height: 52px;
  padding: 0; border: 1.5px solid transparent;
  border-radius: var(--r-sm);
  overflow: hidden;
  cursor: pointer;
  opacity: 0.6;
  background: var(--surface-sunken);
}
.thumbs button.on{ opacity: 1; border-color: var(--accent);}
.thumbs img{ width:100%; height:100%; object-fit: cover;}

.modal__title{
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 22px 0 8px;
  text-wrap: pretty;
}
.modal__loc{
  font-size: 13.5px; color: var(--text-2);
  margin-bottom: 18px;
  display:flex; align-items:center; gap: 6px;
}
.modal__desc{
  font-size: 14px; line-height: 1.62;
  color: var(--text-2);
  text-wrap: pretty;
}
.modal__amen-h{
  font-size: 11px; font-weight: 600;
  color: var(--text-2);
  text-transform: uppercase; letter-spacing: 0.14em;
  margin: 24px 0 12px;
}
.amenitygrid{
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 8px 14px;
}
.amenity{
  display:flex; align-items:center; gap: 8px;
  font-size: 13px; color: var(--text);
}
.amenity__dot{
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

/* right column */
.priceblock{
  padding: 18px 0 24px;
  border-bottom: 1px solid var(--border);
}
.priceblock__big{
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  display:flex; align-items:baseline; gap: 8px;
}
.priceblock__big em{
  font-style:normal; font-size: 16px; color: var(--text-3); font-weight:400;
  font-family: var(--font-body); letter-spacing:0;
}
.priceblock__sub{
  margin-top: 6px;
  font-size: 13px; color: var(--text-2);
}

.specgrid{
  display:grid; grid-template-columns: repeat(2, 1fr);
  gap: 16px 12px;
  padding: 22px 0;
  border-bottom: 1px solid var(--border);
}
.specgrid > div{
  display: flex; flex-direction: column; gap: 2px;
}
.spec__k{ font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.1em;}
.spec__v{
  font-size: 16px; color: var(--text); font-weight: 500;
  font-variant-numeric: tabular-nums;
  font-family: var(--font-display);
  letter-spacing: -0.01em;
}

.pricehist{
  padding: 22px 0;
  border-bottom: 1px solid var(--border);
}
.pricehist__h{
  font-size: 11px; font-weight: 600;
  color: var(--text-2);
  text-transform: uppercase; letter-spacing: 0.14em;
  margin: 0 0 14px;
}
.pricehist__step{
  display:flex; align-items:center; gap: 10px;
  padding: 6px 0;
  font-size: 13px;
}
.pricehist__date{ color: var(--text-3); font-size: 12px; font-variant-numeric: tabular-nums; width: 84px; flex-shrink: 0;}
.pricehist__from{ color: var(--text-3); text-decoration: line-through; font-variant-numeric: tabular-nums;}
.pricehist__arrow{ color: var(--text-3); font-size: 11px;}
.pricehist__to{ color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums;}

.minimap{
  height: 160px;
  border-radius: var(--r-md);
  overflow: hidden;
  margin-bottom: 18px;
  position: relative;
  background: var(--surface-sunken);
}

.modal__ft{
  display:flex; gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.btn{
  height: 42px;
  padding: 0 18px;
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display:inline-flex; align-items:center; gap: 8px;
  border: 1px solid transparent;
  font-family: inherit;
  transition: background .12s, border-color .12s, color .12s;
}
.btn--primary{
  background: var(--accent); color: white;
  margin-left: auto;
}
.btn--primary:hover{ background: var(--accent-hover);}
.btn--ghost{
  background: transparent; color: var(--text);
  border-color: var(--border-strong);
}
.btn--ghost:hover{ background: var(--surface-2);}

/* tweak panel small style overrides */
.tweaks-panel-root{ z-index: 200;}

@media (max-width: 1280px){
  .chips{ display: none; }
  .brand__tag{ display: none; }
}
@media (max-width: 1100px){
  .grid--cozy{ --cols: 3;}
  .grid--compact{ --cols: 4;}
  .modal__body{ grid-template-columns: 1fr;}
  .modal__left{ border-right: none; border-bottom: 1px solid var(--border);}
}
@media (max-width: 820px){
  .grid--cozy, .grid--comfy{ --cols: 2;}
  .grid--compact{ --cols: 3;}
  .rail{ display: none;}
  .main{ grid-template-columns: 1fr; }
}
