body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

#map {
  height: 100vh;
  width: 100vw;
}

.u-muted {
  opacity: 0.75;
}

.u-muted-sm {
  font-size: 12px;
  opacity: 0.75;
}

.topbar {
  position: absolute;
  z-index: 1600;
  left: 12px;
  right: 12px;
  top: 12px;
  display: flex;
  gap: 8px;
  align-items: flex-start;
  justify-content: space-between;
  pointer-events: auto;
  flex-wrap: wrap;
}

.pill {
  pointer-events: auto;
  background: white;
  padding: 8px 10px;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.pill label {
  display: flex;
  gap: 6px;
  align-items: center;
  white-space: nowrap;
}

.pill select {
  max-width: 140px;
}

.link {
  color: #111;
  text-decoration: none;
  font-weight: 600;
}

.btn {
  border: 0;
  background: #111;
  color: #fff;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn--blue {
  background: #2563eb;
}

.btn--green {
  background: #0b6;
}

.btn--dark {
  background: #444;
}

.btn--muted {
  background: #666;
}

.filtersPanel {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: #fff;
  border-top-left-radius: 18px;
  border-top-right-radius: 18px;
  box-shadow: 0 -12px 30px rgba(0, 0, 0, 0.18);
  z-index: 1200;
  transform: translateY(65%);
  transition: transform 0.18s ease;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
}

.sheet--collapsed {
  transform: translateY(65%);
}

.sheet--half {
  transform: translateY(30%);
}

.sheet--open {
  transform: translateY(0%);
}

.sheet__handle {
  padding: 10px 12px 8px;
  cursor: grab;
  user-select: none;
}

.sheet__grab {
  width: 44px;
  height: 5px;
  background: #d6d6d6;
  border-radius: 999px;
  margin: 0 auto 8px;
}

.sheet__title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 14px;
}

.sheet__body {
  overflow: auto;
  border-top: 1px solid #eee;
}

.sheet__empty {
  padding: 12px;
  opacity: 0.8;
  display: none;
}

#sheetList {
  padding-bottom: 10px;
}

@keyframes sheetFocus {
  from { transform: scale(.98); }
  to { transform: scale(1); }
}

.sheetItem--focused .sheetItem__title {
  color: #165dff;
}

.badges {
  font-size: 12px;
  opacity: 0.85;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.modalOverlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 2000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 12px;
}

.modalOverlay.is-hidden {
  display: none;
}

.modalCard {
  width: 100%;
  max-width: 520px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  padding: 12px;
  max-height: 78vh;
  overflow: auto;
}

.modalHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.modalBody {
  margin-top: 10px;
}

.modalText,
.modalLabel,
.modalMsg {
  font-size: 13px;
  opacity: 0.85;
}

.modalText {
  margin-top: 10px;
}

.modalLabel {
  margin-top: 12px;
}

.modalMsg {
  margin-top: 8px;
}

.modalActions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
}

.stars {
  display: flex;
  gap: 8px;
}

.star {
  border: 0;
  background: #eee;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 18px;
  cursor: pointer;
}

.star.is-on {
  background: #111;
  color: #fff;
}

.chipRow {
  margin-top: 8px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip {
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 999px;
  padding: 8px 10px;
  font-size: 12px;
  cursor: pointer;
}

.chip.is-on {
  border-color: #111;
  background: #111;
  color: #fff;
}

.field {
  margin-top: 10px;
}

.field label {
  display: block;
  font-size: 13px;
  opacity: 0.85;
  margin-bottom: 4px;
}

.fieldHelp {
  margin-top: 6px;
  font-size: 12px;
  opacity: 0.75;
}

.input,
.textarea {
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #ddd;
  box-sizing: border-box;
}

.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

.grid2 label {
  font-size: 13px;
  opacity: 0.85;
}

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

.pinPickerBar {
  position: fixed;
  left: 12px;
  right: 12px;
  top: 12px;
  z-index: 2500;
}

.pinPickerBar.is-hidden {
  display: none;
}

.pinPickerPill {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.campPopup {
  width: 240px;
}

.campPopup__coverWrap {
  width: 100%;
  height: 132px;
  overflow: hidden;
  border-radius: 12px;
  background: #f1f5f9;
  margin-bottom: 8px;
}

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

.campPopup__title {
  display: inline-block;
  font-weight: 700;
  text-decoration: none;
  line-height: 1.2;
  margin-bottom: 2px;
}

.campPopup__badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 4px 0 2px;
}

.campPopup__meta {
  font-size: 13px;
}

.campPopup__sub {
  font-size: 12px;
  opacity: 0.8;
}

.campPopup__divider {
  border: 0;
  height: 1px;
  background: #eee;
  margin: 6px 0;
}

.campPopup__navRow {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.campPopup__navBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #0f172a;
  color: #ffffff !important;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  border-radius: 10px;
  padding: 8px 10px;
}

.campPopup__navBtn--waze {
  background: #2563eb;
  color: #ffffff !important;
}

.activeFilters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 12px 2px;
  border-bottom: 1px solid #f1f5f9;
  background: #fff;
}

.activeFilterChip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 12px;
  color: #334155;
  line-height: 1;
}

.activeFilterChip__remove {
  border: 0;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.activeFilterChip__remove:hover {
  color: #0f172a;
}

.badgePill,
.sheetBadge {
  display: inline-flex;
  align-items: center;
  gap: .28rem;
  padding: .3rem .56rem;
  border-radius: 999px;
  font-size: .76rem;
  font-weight: 700;
  border: 1px solid transparent;
}

.badgePill--verified {
  background: rgba(34, 197, 94, .12);
  color: #166534;
  border-color: rgba(34, 197, 94, .18);
}

.badgePill--top {
  background: rgba(250, 204, 21, .14);
  color: #854d0e;
  border-color: rgba(250, 204, 21, .22);
}

.badgePill--nearest {
  background: rgba(59, 130, 246, .12);
  color: #1d4ed8;
  border-color: rgba(59, 130, 246, .18);
}

.badgePill--featured,
.sheetBadge--highlighted {
  background: rgba(168, 85, 247, .12);
  color: #7e22ce;
  border-color: rgba(168, 85, 247, .18);
}

.input--compact {
  width: 100%;
  min-width: 180px;
  max-width: 220px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  box-sizing: border-box;
}

.filtersPanel label {
  font-size: 13px;
  color: #334155;
}

.searchFieldWrap {
  position: relative;
}

.searchAutocomplete {
  position: relative;
}

.searchSuggestions {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.10);
  overflow: hidden;
  z-index: 1400;
}

.searchSuggestions.is-hidden {
  display: none;
}

.searchSuggestionItem {
  width: 100%;
  border: 0;
  background: #fff;
  text-align: left;
  padding: 10px 12px;
  cursor: pointer;
  font-size: 13px;
  color: #0f172a;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.searchSuggestionItem:hover {
  background: #f8fafc;
}

.searchSuggestionItem__title {
  font-weight: 700;
}

.searchSuggestionItem__meta {
  font-size: 12px;
  color: #64748b;
}

.searchSuggestionItem strong {
  color: #2563eb;
  font-weight: 700;
}

.leaflet-control-layers {
  z-index: 1500;
}

.leaflet-bottom.leaflet-right {
  bottom: 90px;
}

.campMarker {
  background: transparent;
  border: 0;
}

.campMarker__wrap {
  position: relative;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.campMarker__icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: white;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .35);
  border: 2px solid rgba(255, 255, 255, .25);
  transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease;
}

.campMarker__wrap--highlighted .campMarker__icon {
  background: linear-gradient(135deg, #16a34a, #22c55e);
}

.campMarker__star {
  position: absolute;
  top: -6px;
  left: -6px;
  background: #facc15;
  color: #111;
  font-size: 10px;
  border-radius: 50%;
  padding: 2px 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .3);
}

.campMarker__roof {
  position: absolute;
  bottom: -6px;
  right: -6px;
  background: #0284c7;
  color: white;
  font-size: 11px;
  border-radius: 999px;
  padding: 2px 5px;
  line-height: 1;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .35);
  border: 1px solid rgba(255, 255, 255, .4);
}

.campMarker__distance {
  margin-top: 4px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .94);
  border: 1px solid rgba(15, 23, 42, .08);
  box-shadow: 0 4px 10px rgba(15, 23, 42, .08);
  font-size: 11px;
  font-weight: 700;
  color: #334155;
  white-space: nowrap;
  position: absolute;
  bottom: -22px;
}

.campMarker__wrap:hover .campMarker__icon {
  transform: scale(1.08);
  transition: all .15s ease;
}

.campMarker--active .campMarker__icon {
  transform: scale(1.18);
  box-shadow: 0 8px 18px rgba(37, 99, 235, .35);
}

.campMarker--active .campMarker__distance {
  background: #2563eb;
  color: #fff;
}

.sheetAction--nav {
  background: #0f172a;
  color: #fff;
}

.sheetAction--waze {
  color: #1d4ed8;
}

.sheetLoadMoreBtn {
  width: 100%;
  margin-top: .75rem;
}

.sheetEmptyState {
  display: grid;
  gap: .75rem;
  text-align: center;
  padding: 1rem .4rem;
}

.sheetEmptyState__icon {
  font-size: 2rem;
  line-height: 1;
}

.sheetEmptyState__title {
  font-weight: 800;
  color: #0f172a;
  font-size: 1rem;
}

.sheetEmptyState__text {
  color: #64748b;
  line-height: 1.65;
  font-size: .94rem;
  max-width: 420px;
  margin: 0 auto;
}

.sheetEmptyState__actions {
  display: flex;
  justify-content: center;
  margin-top: .2rem;
}

.sheetAmenity--covered {
  background: rgba(14, 165, 233, .12);
  border: 1px solid rgba(14, 165, 233, .22);
  color: #0369a1;
  font-weight: 700;
}

/* Mejoras al sheetItem (muy pro) */

.sheetItem {
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 18px;
  padding: .8rem;
  margin-bottom: .85rem;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}

.sheetItem:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(15, 23, 42, .12);
  border-color: rgba(14, 165, 233, .22);
}

.sheetItem--focused {
  border-color: rgba(14, 165, 233, .42);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, .10), 0 14px 30px rgba(15, 23, 42, .14);
}

.sheetItem__topRow {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  align-items: flex-start;
}

.sheetItem__headlineLeft {
  min-width: 0;
  flex: 1;
}

.sheetItem__title {
  display: inline-block;
  color: #0f172a;
  text-decoration: none;
  font-size: 1.02rem;
  line-height: 1.2;
  font-weight: 800;
}

.sheetItem__title:hover {
  text-decoration: underline;
}

.sheetItem__submeta {
  margin-top: .28rem;
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  align-items: center;
  font-size: .88rem;
  color: rgba(15, 23, 42, .64);
}

.sheetItem__distance {
  opacity: .9;
  font-size: .88rem;
  white-space: nowrap;
  margin-top: 0;
}

.sheetItem__dot {
  opacity: .5;
}

.sheetItem__ratingInline {
  font-weight: 600;
}

.sheetItem__badges {
  display: flex;
  flex-wrap: wrap;
  gap: .42rem;
  margin-top: .55rem;
}

.sheetItem__desc {
  margin-top: .62rem;
  font-size: .93rem;
  line-height: 1.45;
  color: rgba(15, 23, 42, .78);
}

.sheetItem__quickMeta {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-top: .7rem;
}

.sheetQuickChip {
  display: inline-flex;
  align-items: center;
  gap: .28rem;
  padding: .34rem .58rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, .05);
  border: 1px solid rgba(15, 23, 42, .06);
  font-size: .82rem;
  color: #0f172a;
}

.sheetAmenities {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-top: .7rem;
}

.sheetAmenity {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .34rem .58rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, .04);
  border: 1px solid rgba(15, 23, 42, .06);
  font-size: .81rem;
  color: rgba(15, 23, 42, .82);
}

.sheetActions {
  margin-top: .82rem;
  display: grid;
  gap: .6rem;
}

.sheetPrimaryAction {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 40px;
  border-radius: 12px;
  background: #0f172a;
  color: white;
  text-decoration: none;
  font-weight: 700;
  transition: background .14s ease, transform .14s ease;
}

.sheetPrimaryAction:hover {
  background: #1e293b;
  transform: translateY(-1px);
}

.sheetSecondaryActions {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
}

.sheetAction {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: .45rem .65rem;
  border-radius: 10px;
  background: rgba(15, 23, 42, .05);
  border: 1px solid rgba(15, 23, 42, .06);
  color: #0f172a;
  text-decoration: none;
  font-size: .84rem;
}

.sheetAction:hover {
  background: rgba(15, 23, 42, .09);
}

.sheetAction--wa {
  background: #25D366;
  color: white;
}

.sheetDivider {
  display: none;
}

.sheetItem__photoWrap {
  position: relative;
  width: 100%;
  height: 168px;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: .75rem;
  background: rgba(15, 23, 42, .06);
}

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

.sheetItem__photoGradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, .35), rgba(15, 23, 42, .02));
  pointer-events: none;
}

.sheetItem__photoOverlay {
  position: absolute;
  top: .55rem;
  right: .55rem;
}

.sheetItem__photoBadge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .28rem .48rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .94);
  color: #0f172a;
  font-size: .78rem;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .12);
}

@media (min-width: 901px) {
  #btnToggleFilters {
    display: none;
  }

  .filtersPanel {
    display: flex !important;
  }

  .sheet {
    left: 12px;
    right: auto;
    width: 420px;
    bottom: 12px;
    border-radius: 18px;
    max-height: calc(100vh - 120px);
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .filtersPanel {
    display: none;
    width: 100%;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #eee;
  }

  .filtersPanel.is-open {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    align-items: start;
  }

  .filtersPanel.is-open .checks {
    grid-column: 1 / -1;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
  }

  .filtersPanel.is-open .actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
  }

  .filtersPanel.is-open select {
    width: 100%;
    max-width: none;
  }

  .filtersPanel.is-open label {
    min-width: 0;
  }

  .filtersPanel.is-open input,
  .filtersPanel.is-open select {
    width: 100%;
    min-width: 0;
    max-width: none;
    box-sizing: border-box;
  }
}

@media (max-width: 700px) {
  .modalCard {
    max-height: 86vh;
  }
}

/* =========================
   Map top controls
   ========================= */

/* Escritorio: no tapar el feed lateral */
.topbar {
  left: 448px;
  right: 12px;
  top: 12px;
  display: flex;
  gap: 8px;
  align-items: flex-start;
  justify-content: flex-start;
  pointer-events: auto;
  flex-wrap: wrap;
}

.topbar > .pill:first-child {
  display: flex;
}

.mapMobileBack {
  display: block;
  width: fit-content;
  background: white;
  padding: 8px 10px;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.mapControlsBar {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  background: white;
  padding: 8px 10px;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  box-sizing: border-box;
}

.mapControlsBar > .btn {
  flex: 1 1 0;
  min-width: 0;
}

.mapFiltersPanel {
  pointer-events: auto;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  background: white;
  padding: 8px 10px;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  box-sizing: border-box;
}

/* Móvil/tablet */
@media (max-width: 900px) {
  .topbar {
    left: 8px;
    right: 8px;
    top: 8px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .topbar > .pill:first-child {
    display: none;
  }

  .mapMobileBack {
    display: block;
    width: fit-content;
    background: white;
    padding: 6px 10px;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  }

  .mapControlsBar {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 6px;
  }

  .mapControlsBar > .btn {
    width: 100%;
    min-width: 0;
    padding: 8px 4px;
    font-size: 12px;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mapFiltersPanel {
    display: none;
    width: 100%;
    background: white;
    padding: 10px;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  }

  .mapFiltersPanel.is-open {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    box-sizing: border-box;
  }
}