/* ── DISCOVER PAGE — LAYOUT & COMPONENTS ── */

:root {
  --or: #E8541A;
  --orl: #F06B2E;
  --orp: #FDF0EA;
  --bk: #1A1A1A;
  --dk: #2C2C2C;
  --md: #6B6B6B;
  --lt: #F7F4F1;
  --wh: #FFFFFF;
  --bd: #E8E3DE;
  --nav-h: 62px;
  --stats-h: 52px;
  --sidebar-w: 380px;
  --radius: 8px;
  --shadow: 0 2px 12px rgba(0,0,0,0.07);
  --transition: 0.2s ease;
  --color-cafe: #F97316;
  --color-outdoor: #EF4444;
  --color-apartment: #3B82F6;
  --color-mall: #10B981;
  --color-gym: #8B5CF6;
  --color-office: #6B7280;
  --color-other: #F59E0B;
  --color-active: #22C55E;
}

*,*::before,*::after { margin:0; padding:0; box-sizing:border-box }
html { scroll-behavior: smooth }

body.discover-page {
  font-family: 'Inter','Helvetica Neue',Arial,sans-serif;
  background: var(--wh);
  color: var(--bk);
  -webkit-font-smoothing: antialiased;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding-top: var(--nav-h);
}

/* ── STATS BAR ── */
.stats-bar {
  flex-shrink: 0;
  height: var(--stats-h);
  background: #FAFAFA;
  border-bottom: 1px solid var(--bd);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 0 2rem;
  z-index: 90;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 1.4rem;
  border-right: 1px solid var(--bd);
}
.stat-item:last-child { border-right: none }
.stat-icon { font-size: 0.9rem; flex-shrink: 0 }
.stat-value {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--bk);
  white-space: nowrap;
}
.stat-label {
  font-size: 0.75rem;
  color: var(--md);
  font-weight: 500;
  white-space: nowrap;
}

/* ── MAIN LAYOUT ── */
.discover-layout {
  flex: 1;
  display: flex;
  overflow: hidden;
  position: relative;
}

/* ── SIDEBAR ── */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--bd);
  background: var(--wh);
  height: 100%;
  overflow: hidden;
  z-index: 10;
}

.sidebar-inner {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.sidebar-inner::-webkit-scrollbar { width: 4px }
.sidebar-inner::-webkit-scrollbar-track { background: transparent }
.sidebar-inner::-webkit-scrollbar-thumb { background: var(--bd); border-radius: 2px }

/* Search */
.search-wrap {
  padding: 1rem 1rem 0.75rem;
  border-bottom: 1px solid var(--bd);
  position: sticky;
  top: 0;
  background: var(--wh);
  z-index: 5;
}

.search-input-wrap {
  position: relative;
}
.search-input-wrap svg {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--md);
  pointer-events: none;
  flex-shrink: 0;
}
#search-input {
  width: 100%;
  padding: 0.6rem 0.75rem 0.6rem 2.25rem;
  border: 1px solid var(--bd);
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-family: inherit;
  color: var(--bk);
  background: #FAFAFA;
  outline: none;
  transition: border-color var(--transition);
}
#search-input:focus { border-color: var(--or); background: var(--wh) }
#search-input::placeholder { color: var(--md) }

/* Active Filter Tags */
#active-tags {
  display: none;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--bd);
  align-items: center;
  background: var(--orp);
}

.filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--bk);
  color: var(--wh);
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  font-size: 0.74rem;
  font-weight: 500;
}
.tag-remove {
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  font-size: 0.72rem;
  padding: 0;
  line-height: 1;
  transition: color var(--transition);
}
.tag-remove:hover { color: var(--wh) }

.clear-all {
  background: none;
  border: 1px solid var(--or);
  color: var(--or);
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background var(--transition), color var(--transition);
}
.clear-all:hover { background: var(--or); color: var(--wh) }

/* ── FILTER GROUPS ── */
.filters-section {
  border-bottom: 1px solid var(--bd);
}

.filter-group {
  border-bottom: 1px solid var(--bd);
}
.filter-group:last-child { border-bottom: none }

.filter-group summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--bk);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  user-select: none;
  transition: color var(--transition);
}
.filter-group summary::-webkit-details-marker { display: none }
.filter-group summary::after {
  content: '+';
  font-size: 1rem;
  font-weight: 400;
  color: var(--md);
  transition: transform 0.2s;
}
.filter-group[open] summary::after { content: '−' }
.filter-group summary:hover { color: var(--or) }

.filter-body {
  padding: 0 1rem 0.9rem;
}

/* Chip-style checkboxes (Screen Type, Screen Size) */
.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.chip-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid var(--bd);
  border-radius: 999px;
  padding: 0.28rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--dk);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), color var(--transition);
  white-space: nowrap;
}
.chip-label:hover { border-color: var(--or); color: var(--or) }
.chip-label input { position: absolute; opacity: 0; width: 0; height: 0 }
.chip-label:has(input:checked) {
  background: var(--bk);
  border-color: var(--bk);
  color: var(--wh);
}

/* Checkbox list (City, Area) */
.checkbox-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--dk);
  transition: color var(--transition);
}
.checkbox-label:hover { color: var(--bk) }
.checkbox-label input[type="checkbox"] {
  width: 15px;
  height: 15px;
  border: 1.5px solid var(--bd);
  border-radius: 3px;
  appearance: none;
  cursor: pointer;
  flex-shrink: 0;
  transition: background var(--transition), border-color var(--transition);
  position: relative;
}
.checkbox-label input[type="checkbox"]:checked {
  background: var(--bk);
  border-color: var(--bk);
}
.checkbox-label input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 2px;
  top: -1px;
  width: 5px;
  height: 9px;
  border: 2px solid white;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}

/* Radio buttons (Footfall) */
.radio-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.radio-label {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--dk);
  transition: color var(--transition);
}
.radio-label:hover { color: var(--bk) }
.radio-label input[type="radio"] {
  width: 15px;
  height: 15px;
  border: 1.5px solid var(--bd);
  border-radius: 50%;
  appearance: none;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  transition: border-color var(--transition);
}
.radio-label input[type="radio"]:checked { border-color: var(--bk) }
.radio-label input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  left: 2px;
  top: 2px;
  width: 7px;
  height: 7px;
  background: var(--bk);
  border-radius: 50%;
}

/* Toggle switch */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.toggle-row label {
  font-size: 0.85rem;
  color: var(--dk);
  cursor: pointer;
}
.toggle-switch {
  position: relative;
  width: 36px;
  height: 20px;
  flex-shrink: 0;
}
.toggle-switch input { opacity: 0; width: 0; height: 0 }
.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--bd);
  border-radius: 20px;
  cursor: pointer;
  transition: background var(--transition);
}
.toggle-slider::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 2px;
  width: 16px;
  height: 16px;
  background: white;
  border-radius: 50%;
  transition: transform var(--transition);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle-switch input:checked + .toggle-slider { background: var(--bk) }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(16px) }

/* ── RESULTS COUNT ── */
.results-count-row {
  padding: 0.7rem 1rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
#results-count {
  font-size: 0.78rem;
  color: var(--md);
  font-weight: 500;
}

/* ── CARDS LIST ── */
.cards-list {
  padding: 0.6rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.screen-card {
  border: 1px solid var(--bd);
  border-left: 4px solid var(--bd);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  cursor: pointer;
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
  background: var(--wh);
  position: relative;
}
.screen-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.09);
  transform: translateY(-1px);
}
.screen-card.card-highlight {
  background: var(--orp);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.card-status {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.status-active { color: var(--color-active) }
.status-inactive { color: var(--md) }

.card-type-tag {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.card-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--bk);
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

.card-location {
  font-size: 0.79rem;
  color: var(--md);
  margin-bottom: 0.5rem;
}

.card-meta {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
}
.card-meta span {
  font-size: 0.76rem;
  color: var(--dk);
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--bd);
}
.card-id { font-size: 0.72rem; color: var(--md); font-weight: 500 }
.card-arrow { font-size: 0.85rem; color: var(--or); font-weight: 700 }

.no-results {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--md);
  font-size: 0.88rem;
  line-height: 1.7;
}
.no-results button {
  margin-top: 0.75rem;
  background: var(--bk);
  color: var(--wh);
  border: none;
  border-radius: 4px;
  padding: 0.45rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background var(--transition);
}
.no-results button:hover { background: var(--dk) }

/* ── SIDEBAR CTA ── */
.sidebar-cta {
  flex-shrink: 0;
  background: var(--bk);
  color: var(--wh);
  padding: 1rem 1.2rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.sidebar-cta p.cta-eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-bottom: 0.25rem;
}
.sidebar-cta p.cta-text {
  font-size: 0.84rem;
  color: rgba(255,255,255,0.75);
  line-height: 1.4;
  margin-bottom: 0.8rem;
}
.btn-list-screen {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--or);
  color: var(--wh);
  border: none;
  border-radius: 4px;
  padding: 0.6rem 1.2rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  font-family: inherit;
  width: 100%;
  justify-content: center;
  transition: background var(--transition);
}
.btn-list-screen:hover { background: var(--orl) }

/* Mobile filter toggle button */
.mobile-filter-btn {
  display: none;
}

/* ── MAP CONTAINER ── */
.map-container {
  flex: 1;
  position: relative;
  overflow: hidden;
}

#map {
  width: 100%;
  height: 100%;
}

/* Mobile map/list toggle bar */
.mobile-toggle-bar {
  display: none;
}

/* ── DETAIL PANEL ── */
.detail-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 420px;
  background: var(--wh);
  z-index: 50;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
  box-shadow: -6px 0 32px rgba(0,0,0,0.12);
  -webkit-overflow-scrolling: touch;
}
.detail-panel.open { transform: translateX(0) }

.detail-panel::-webkit-scrollbar { width: 4px }
.detail-panel::-webkit-scrollbar-thumb { background: var(--bd) }

.panel-close {
  position: sticky;
  top: 0.75rem;
  left: calc(100% - 2.5rem);
  width: 32px;
  height: 32px;
  background: var(--wh);
  border: 1px solid var(--bd);
  border-radius: 50%;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  float: right;
  margin: 0.75rem 0.75rem 0 0;
  transition: background var(--transition), border-color var(--transition);
}
.panel-close:hover { background: var(--lt); border-color: var(--bk) }

.panel-photo-placeholder {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  clear: both;
}
.panel-type-icon { font-size: 3rem }

.panel-body { padding: 0 1.25rem 1.5rem }

.panel-header { margin-bottom: 1.1rem }
.panel-badges {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}
.status-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: rgba(34,197,94,0.12);
  color: var(--color-active);
}
.badge-inactive {
  background: rgba(107,114,128,0.1);
  color: var(--md);
}
.type-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
}

.panel-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--bk);
  line-height: 1.25;
  margin-bottom: 0.35rem;
}
.panel-address {
  font-size: 0.83rem;
  color: var(--md);
  line-height: 1.5;
}

.panel-section {
  margin-bottom: 1.2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--bd);
}
.panel-section h3 {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--or);
  margin-bottom: 0.65rem;
}

.panel-table {
  width: 100%;
  border-collapse: collapse;
}
.panel-table td {
  padding: 0.38rem 0;
  font-size: 0.84rem;
  vertical-align: top;
  line-height: 1.4;
}
.panel-table td:first-child {
  color: var(--md);
  width: 45%;
  font-weight: 500;
}
.panel-table td:last-child {
  color: var(--bk);
  font-weight: 600;
}

.panel-meta {
  padding: 0.5rem 0;
  font-size: 0.74rem;
  color: var(--md);
  border-top: 1px solid var(--bd);
  margin-bottom: 1rem;
}

.panel-cta {
  background: var(--lt);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  text-align: center;
}
.panel-cta p {
  font-size: 0.84rem;
  color: var(--md);
  margin-bottom: 0.75rem;
}
.btn-primary-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--or);
  color: var(--wh);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.65rem 1.5rem;
  border-radius: 4px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: background var(--transition);
}
.btn-primary-cta:hover { background: var(--orl) }

/* ── MODAL ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(4px);
}
.modal-overlay.hidden { display: none }

.modal {
  background: var(--wh);
  border-radius: 12px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 80px rgba(0,0,0,0.2);
  position: relative;
}

.modal-header {
  padding: 1.5rem 1.5rem 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.modal-header h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--bk);
  line-height: 1.2;
}
.modal-header p {
  font-size: 0.85rem;
  color: var(--md);
  margin-top: 0.25rem;
}
.modal-close {
  background: none;
  border: 1px solid var(--bd);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--dk);
  transition: background var(--transition);
}
.modal-close:hover { background: var(--lt) }

.modal-body { padding: 0 1.5rem 1.5rem }

.form-group {
  margin-bottom: 1rem;
}
.form-group label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--bk);
  margin-bottom: 0.35rem;
  letter-spacing: 0.03em;
}
.form-group label .req { color: var(--or) }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  border: 1px solid var(--bd);
  border-radius: 6px;
  padding: 0.6rem 0.8rem;
  font-size: 0.88rem;
  font-family: inherit;
  color: var(--bk);
  background: var(--wh);
  outline: none;
  transition: border-color var(--transition);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--or) }
.form-group textarea { resize: vertical; min-height: 80px }
.form-group select { appearance: none; cursor: pointer }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.radio-group-inline {
  display: flex;
  gap: 1.5rem;
}
.radio-group-inline label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--dk);
  cursor: pointer;
  margin-bottom: 0;
}
.radio-group-inline input[type="radio"] {
  width: 15px;
  height: 15px;
  border: 1.5px solid var(--bd);
  border-radius: 50%;
  appearance: none;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
}
.radio-group-inline input[type="radio"]:checked { border-color: var(--or) }
.radio-group-inline input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  left: 2px; top: 2px;
  width: 7px; height: 7px;
  background: var(--or);
  border-radius: 50%;
}

.form-submit {
  background: var(--bk);
  color: var(--wh);
  border: none;
  border-radius: 4px;
  padding: 0.75rem 1.5rem;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  font-family: inherit;
  width: 100%;
  transition: background var(--transition);
  margin-top: 0.5rem;
}
.form-submit:hover { background: var(--dk) }

.form-success {
  text-align: center;
  padding: 2.5rem 1.5rem;
}
.form-success .success-icon { font-size: 2.5rem; margin-bottom: 0.75rem }
.form-success h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--bk);
  margin-bottom: 0.5rem;
}
.form-success p {
  font-size: 0.88rem;
  color: var(--md);
  line-height: 1.6;
}

/* ── NAV (shared, match index.html) ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--bd);
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5vw;
}
.nl { display:flex; flex-direction:column; gap:2px; text-decoration:none }
.nl .br { font-weight:600; font-size:.9rem; letter-spacing:.22em; color:var(--bk); text-transform:uppercase }
.nl .sb { font-size:.55rem; letter-spacing:.16em; text-transform:uppercase; color:var(--or); font-weight:500 }
.nv { display:flex; align-items:center; gap:2rem; list-style:none }
.nv a { text-decoration:none; font-size:.72rem; font-weight:600; letter-spacing:.12em; text-transform:uppercase; color:var(--dk); transition:color .2s }
.nv a:hover, .nv a.active { color:var(--or) }
.nv .nc { background:var(--or); color:var(--wh)!important; padding:.44rem 1.1rem; border-radius:3px; transition:background .2s!important }
.nv .nc:hover { background:var(--orl)!important }
.hbg { display:none; flex-direction:column; gap:5px; cursor:pointer; padding:4px; background:none; border:none }
.hbg span { display:block; width:22px; height:2px; background:var(--bk); border-radius:2px }
.mm { display:none; position:fixed; top:var(--nav-h); left:0; right:0; background:var(--wh); border-bottom:1px solid var(--bd); z-index:199; padding:1rem 5vw 1.5rem; flex-direction:column }
.mm.open { display:flex }
.mm a { text-decoration:none; font-size:.75rem; font-weight:600; letter-spacing:.12em; text-transform:uppercase; color:var(--dk); padding:.75rem 0; border-bottom:1px solid var(--bd); display:block }
.mm a:last-child { border-bottom:none }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  :root {
    --stats-h: auto;
    --sidebar-w: 100%;
  }

  nav { padding: 0 5vw }
  .nv { display: none }
  .hbg { display: flex }

  body.discover-page {
    overflow: auto;
    height: auto;
  }

  .stats-bar {
    height: auto;
    flex-wrap: wrap;
    justify-content: flex-start;
    padding: 0.6rem 1rem;
    gap: 0;
  }
  .stat-item {
    width: 50%;
    padding: 0.35rem 0.5rem;
    border-right: none;
    border-bottom: 1px solid var(--bd);
  }
  .stat-item:nth-child(odd) { border-right: 1px solid var(--bd) }
  .stat-item:nth-child(3), .stat-item:nth-child(4) { border-bottom: none }

  .discover-layout {
    flex-direction: column;
    height: auto;
    overflow: visible;
  }

  .map-container {
    height: 40vh;
    flex-shrink: 0;
    order: 1;
  }

  .mobile-toggle-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1rem;
    background: var(--wh);
    border-bottom: 1px solid var(--bd);
    order: 2;
    z-index: 5;
  }
  #map-list-toggle {
    background: var(--bk);
    color: var(--wh);
    border: none;
    border-radius: 999px;
    padding: 0.4rem 1rem;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    letter-spacing: 0.05em;
  }
  .mobile-filter-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--wh);
    border: 1px solid var(--bd);
    border-radius: 999px;
    padding: 0.4rem 0.9rem;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    color: var(--dk);
  }
  .mobile-filter-btn.active { background: var(--bk); color: var(--wh); border-color: var(--bk) }

  .sidebar {
    width: 100%;
    height: auto;
    overflow: visible;
    order: 3;
    border-right: none;
    border-top: 1px solid var(--bd);
  }
  .sidebar-inner {
    overflow: visible;
    height: auto;
  }

  .filters-section {
    display: none;
  }
  .filters-section.mobile-open {
    display: block;
  }

  .detail-panel {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    transform: translateY(100%);
    z-index: 250;
  }
  .detail-panel.open { transform: translateY(0) }

  .form-row { grid-template-columns: 1fr }

  .modal { max-height: 100vh; border-radius: 12px 12px 0 0 }
  .modal-overlay { align-items: flex-end; padding: 0 }
}

@media (max-width: 480px) {
  .stat-item { width: 50% }
}
