:root {
  --gastro: #ea580c;
  --rural: #16a34a;
  --outdoor: #0284c7;
  --cultural: #9333ea;
  --rails: #475569;
  --gold: #c9a227;
  --gold-soft: #f5e6b8;
  --ink: #2a2118;
  --muted: #6f6558;
  --line: rgba(42, 33, 24, 0.1);
  --cream: #f7f1e6;
  --paper: #fffcf7;
  --sidebar-w: 420px;
  --sheet-peek: 230px;
  --radius: 18px;
  --shadow: 0 18px 50px rgba(42, 33, 24, 0.12);
  --font: "Outfit", system-ui, sans-serif;
  --display: "Fraunces", Georgia, serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--cream);
  overflow: hidden;
}

button,
input,
select {
  font: inherit;
}

img,
video,
iframe {
  max-width: 100%;
}

#app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  height: 100%;
  opacity: 0;
  transition: opacity 0.4s ease;
}

#app.is-ready {
  opacity: 1;
}

.sidebar {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background:
    linear-gradient(180deg, rgba(255, 252, 247, 0.94), rgba(247, 241, 230, 0.9));
  backdrop-filter: blur(22px);
  border-right: 1px solid var(--line);
  z-index: 500;
}

.sheet-handle {
  display: none;
}

.brand {
  padding: 22px 22px 8px;
}

.brand__kicker {
  margin: 0 0 6px;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gastro);
  font-weight: 650;
}

.brand h1 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.85rem;
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.brand__sub {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.toolbar {
  padding: 12px 18px 8px;
  display: grid;
  gap: 12px;
  min-width: 0;
}

.filter-block {
  min-width: 0;
}

.filter-label {
  margin: 0 0 6px;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 650;
}

.filter-hint {
  margin: 8px 2px 0;
  font-size: 0.72rem;
  line-height: 1.4;
  color: var(--muted);
}

.cities,
.intents,
.pills {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 2px 8px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  touch-action: pan-x;
  scrollbar-width: thin;
  scrollbar-color: rgba(42, 33, 24, 0.35) transparent;
}

.intents {
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: visible;
  padding-bottom: 2px;
  touch-action: auto;
}

.cities::-webkit-scrollbar,
.pills::-webkit-scrollbar {
  height: 6px;
  display: block;
}

.cities::-webkit-scrollbar-track,
.pills::-webkit-scrollbar-track {
  background: transparent;
}

.cities::-webkit-scrollbar-thumb,
.pills::-webkit-scrollbar-thumb {
  background: rgba(42, 33, 24, 0.32);
  border-radius: 99px;
}

.city-chip {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  border-radius: 999px;
  padding: 7px 12px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 560;
}

.city-chip.is-active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.intent {
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  border-radius: 16px;
  padding: 8px 10px;
  cursor: pointer;
  min-width: 0;
}

.intent span {
  display: grid;
  min-width: 0;
}

.intent strong {
  font-size: 0.8rem;
  font-weight: 650;
  line-height: 1.15;
}

.intent em {
  font-style: normal;
  font-size: 0.68rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.intent.is-active {
  background: color-mix(in srgb, var(--pill, var(--ink)) 16%, var(--paper));
  border-color: color-mix(in srgb, var(--pill, var(--ink)) 55%, var(--line));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--pill, var(--ink)) 35%, transparent);
}

.intent--all.is-active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
  box-shadow: none;
}

.intent--all.is-active em {
  color: rgba(255, 255, 247, 0.72);
}

.intent svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.search,
.select {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 12px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

.search input,
.select select {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 11px 4px;
  outline: none;
  color: var(--ink);
}

.search svg,
.select svg {
  width: 18px;
  height: 18px;
  color: var(--muted);
  flex-shrink: 0;
}

.pills {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 2px 10px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  touch-action: pan-x;
  scrollbar-width: thin;
  scrollbar-color: rgba(42, 33, 24, 0.35) transparent;
}

.pills::-webkit-scrollbar {
  height: 6px;
  display: block;
}

.pills::-webkit-scrollbar-track {
  background: transparent;
}

.pills::-webkit-scrollbar-thumb {
  background: rgba(42, 33, 24, 0.32);
  border-radius: 99px;
}

.pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  border-radius: 999px;
  padding: 7px 12px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 560;
  transition: 0.2s ease;
}

.pill svg,
.pill__icon svg {
  width: 14px;
  height: 14px;
}

.pill__art,
.legend__art,
.chip__art {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: #fff8ee;
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.chip__art {
  width: 16px;
  height: 16px;
}

.pill.is-active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.pill[data-category]:not([data-category="all"]).is-active {
  background: var(--pill, var(--ink));
  border-color: var(--pill, var(--ink));
}

.count {
  margin: 0;
  padding: 4px 22px 10px;
  font-size: 0.82rem;
  color: var(--muted);
}

.results {
  list-style: none;
  margin: 0;
  padding: 0 14px 24px;
  overflow: auto;
  min-height: 0;
  display: grid;
  gap: 12px;
}

.card {
  display: grid;
  grid-template-columns: 118px 1fr;
  align-items: start;
  gap: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover,
.card.is-active {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.card.is-active {
  border-color: rgba(42, 33, 24, 0.28);
}

.card--featured {
  border-color: rgba(201, 162, 39, 0.55);
  box-shadow: 0 0 0 1px rgba(201, 162, 39, 0.25), 0 10px 28px rgba(201, 162, 39, 0.12);
}

.card--featured.is-active {
  border-color: var(--gold);
}

.card__media {
  position: relative;
  width: 100%;
  aspect-ratio: 5 / 4;
  overflow: hidden;
  background: #efe6d6;
}

.card__media.is-empty {
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 252, 247, 0.9), transparent 62%),
    #efe6d6;
}

.card__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.card__body {
  padding: 10px 12px 12px 0;
  min-width: 0;
}

.card h3 {
  margin: 0 0 4px;
  font-size: 0.98rem;
  line-height: 1.25;
}

.card__meta,
.modal__place,
.modal__hours,
.modal__phone {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.card__meta svg,
.modal__place svg,
.modal__hours svg,
.modal__phone svg {
  width: 14px;
  height: 14px;
  margin-top: 1px;
  flex-shrink: 0;
}

.card__excerpt {
  margin: 6px 0 0;
  font-size: 0.78rem;
  color: #7a7166;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.badge-gold,
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge-gold {
  position: absolute;
  top: 8px;
  left: 8px;
  background: linear-gradient(135deg, #f5d76e, #c9a227);
  color: #3b2d08;
  padding: 4px 8px;
  box-shadow: 0 4px 12px rgba(201, 162, 39, 0.35);
}

.badge-gold svg,
.chip svg,
.chip__icon svg {
  width: 12px;
  height: 12px;
}

.chip--cat {
  background: color-mix(in srgb, var(--chip) 14%, white);
  color: var(--chip);
  padding: 5px 10px;
}

.chip--gold {
  background: var(--gold-soft);
  color: #7a5b08;
  padding: 5px 10px;
}

.empty {
  text-align: center;
  padding: 40px 16px;
  color: var(--muted);
}

.empty svg {
  width: 36px;
  height: 36px;
  margin-bottom: 8px;
}

.empty span {
  font-size: 0.85rem;
}

.map-stage {
  position: relative;
  min-width: 0;
}

#map {
  height: 100%;
  background: #c9d6b8;
}

.leaflet-tile-pane {
  filter: saturate(1.08) contrast(1.04) sepia(0.12);
}

.map-intro {
  position: absolute;
  inset: 0;
  z-index: 450;
  display: grid;
  place-content: center;
  text-align: center;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 42%, rgba(255, 252, 247, 0.18), transparent 55%),
    linear-gradient(180deg, rgba(42, 33, 24, 0.28), rgba(42, 33, 24, 0.08) 42%, rgba(42, 33, 24, 0.22));
  opacity: 1;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

.map-intro.is-out {
  opacity: 0;
  visibility: hidden;
}

.map-intro__kicker {
  margin: 0 0 8px;
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #f5e6b8;
  font-weight: 650;
}

.map-intro__title {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.2rem, 4.5vw, 4rem);
  font-weight: 650;
  letter-spacing: -0.04em;
  line-height: 0.95;
  color: #fffcf7;
  text-shadow: 0 12px 40px rgba(24, 18, 12, 0.45);
}

.map-intro__sub {
  margin: 14px 0 0;
  color: rgba(255, 252, 247, 0.88);
  font-size: 1.05rem;
}

.map-stage:not(.is-live) .legend {
  opacity: 0;
}

.map-stage.is-live .legend {
  opacity: 1;
  transition: opacity 0.6s ease 0.15s;
}

.map-stage:not(.is-live) .leaflet-marker-pane,
.map-stage:not(.is-live) .leaflet-shadow-pane {
  opacity: 0;
}

.map-stage.is-live .leaflet-marker-pane,
.map-stage.is-live .leaflet-shadow-pane {
  animation: pins-in 0.7s cubic-bezier(0.22, 1.15, 0.36, 1) both;
}

@keyframes pins-in {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.86);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.legend {
  position: absolute;
  right: 16px;
  bottom: 24px;
  z-index: 400;
  background: rgba(255, 252, 247, 0.88);
  backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 14px;
  box-shadow: var(--shadow);
  min-width: 168px;
}

.legend__title {
  margin: 0 0 8px;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 650;
}

.legend__item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  margin: 6px 0;
}

.legend__art {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: #fff8ee;
  box-shadow: 0 2px 6px rgba(42, 33, 24, 0.18);
}

.legend__pin {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  flex-shrink: 0;
}

.legend__pin svg {
  width: 12px;
  height: 12px;
}

.legend__pin--gold {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #f5d76e, #c9a227);
  color: #3b2d08;
  font-size: 16px;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(42, 33, 24, 0.22);
}

.leaflet-control-zoom {
  border: 0 !important;
  box-shadow: var(--shadow) !important;
  border-radius: 12px !important;
  overflow: hidden;
}

.leaflet-bar a {
  background: rgba(255, 252, 247, 0.95) !important;
  color: var(--ink) !important;
  border-bottom-color: var(--line) !important;
}

.marker-wrap {
  background: none !important;
  border: 0 !important;
}

.pin {
  width: 52px;
  height: 62px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  filter: drop-shadow(0 8px 12px color-mix(in srgb, var(--pin) 42%, rgba(42, 33, 24, 0.35)));
}

.pin__art {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid #fff;
  background: #fff8ee;
  box-sizing: border-box;
  pointer-events: none;
}

.pin__needle {
  width: 12px;
  height: 12px;
  margin-top: -7px;
  background: var(--pin);
  transform: rotate(45deg);
  border-radius: 2px;
  border: 2px solid #fff;
  border-top: 0;
  border-left: 0;
  z-index: -1;
}

.pin__icon {
  display: none;
}

.pin__icon svg {
  width: 18px;
  height: 18px;
}

.pin__star {
  position: absolute;
  top: -8px;
  right: -10px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f5d76e, #c9a227);
  color: #3b2d08;
  font-size: 17px;
  line-height: 1;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
  box-shadow: 0 3px 10px rgba(42, 33, 24, 0.35);
  pointer-events: none;
  z-index: 2;
}

.pin--featured {
  animation: pulse-gold 2.2s ease-in-out infinite;
}

.marker-wrap.is-selected .pin {
  transform: scale(1.12);
  transform-origin: 50% 100%;
}

@keyframes pulse-gold {
  0%,
  100% {
    filter: drop-shadow(0 8px 12px color-mix(in srgb, var(--pin) 42%, rgba(42, 33, 24, 0.35)));
  }
  50% {
    filter: drop-shadow(0 4px 16px rgba(201, 162, 39, 0.9));
  }
}

.leaflet-tooltip.map-tip {
  background: var(--ink);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 6px 10px;
  font-family: var(--font);
  font-size: 0.78rem;
  box-shadow: var(--shadow);
}

.leaflet-tooltip.map-tip::before {
  border-top-color: var(--ink);
}

.modal {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: min(760px, calc(100vw - 32px));
  width: 100%;
}

.modal::backdrop {
  background: rgba(24, 18, 12, 0.55);
  backdrop-filter: blur(8px);
}

.modal__sheet {
  background: var(--paper);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
  position: relative;
  max-height: min(90vh, 860px);
  display: flex;
  flex-direction: column;
}

.modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 252, 247, 0.92);
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
}

.modal__close svg {
  width: 18px;
  height: 18px;
}

.carousel {
  position: relative;
  aspect-ratio: 5 / 4;
  overflow: hidden;
  background: #1c1917;
  flex-shrink: 0;
}

.carousel__track,
.carousel__slide {
  height: 100%;
}

.carousel__slide {
  display: none;
}

.carousel__slide.is-active {
  display: block;
}

.media-frame {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border: 0;
  display: block;
}

.carousel__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 252, 247, 0.9);
  cursor: pointer;
  display: grid;
  place-items: center;
}

.carousel__nav svg {
  width: 18px;
  height: 18px;
}

.carousel__nav--prev {
  left: 12px;
}

.carousel__nav--next {
  right: 12px;
}

.carousel__dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  display: flex;
  justify-content: center;
  gap: 6px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
}

.dot.is-active {
  background: #fff;
  width: 18px;
  border-radius: 99px;
}

.reel-card {
  position: relative;
  display: block;
}

.reel-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.55);
}

.reel-card__overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 8px;
  color: #fff;
  font-weight: 650;
  text-align: center;
}

.modal__body {
  padding: 20px 22px 24px;
  overflow: auto;
}

.modal__chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.modal__body h2 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: 1.7rem;
  letter-spacing: -0.03em;
}

.modal__desc {
  margin: 12px 0;
  line-height: 1.55;
  color: #4a433b;
}

.modal__place,
.modal__hours,
.modal__phone {
  margin-top: 6px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 0.86rem;
  font-weight: 560;
  color: #fff;
}

.btn svg {
  width: 16px;
  height: 16px;
}

.btn--maps {
  background: #1a73e8;
}

.btn--waze {
  background: #33ccff;
  color: #083344;
}

.btn--wa {
  background: #16a34a;
}

.btn--ig {
  background: linear-gradient(135deg, #f58529, #dd2a7b, #8134af);
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

@media (max-width: 900px) {
  #app {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: min(88vh, 760px);
    transform: translateY(calc(100% - var(--sheet-peek)));
    border-right: 0;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -18px 50px rgba(42, 33, 24, 0.18);
    transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
    --sheet-peek: 318px;
  }

  .sidebar.is-expanded {
    transform: translateY(0);
  }

  .sheet-handle {
    display: grid;
    place-items: center;
    width: 100%;
    border: 0;
    background: transparent;
    padding: 10px 0 4px;
    cursor: pointer;
  }

  .sheet-handle span {
    width: 42px;
    height: 5px;
    border-radius: 99px;
    background: #d6cbb8;
  }

  .brand {
    padding: 2px 18px 0;
  }

  .brand__kicker,
  .brand__sub {
    display: none;
  }

  .brand h1 {
    font-size: 1.28rem;
  }

  .toolbar {
    padding: 8px 16px 4px;
    gap: 8px;
  }

  .filter-hint {
    display: none;
  }

  .filter-label {
    margin-bottom: 4px;
  }

  .intents {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 8px;
    touch-action: pan-x;
  }

  .intent {
    flex: 0 0 auto;
    min-width: 132px;
    padding: 7px 10px;
    border-radius: 999px;
  }

  .intent em {
    display: none;
  }

  .count {
    padding: 0 18px 8px;
  }

  .legend {
    left: 10px;
    right: auto;
    top: 10px;
    bottom: auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    padding: 8px 10px;
    min-width: 0;
    max-width: min(220px, calc(100vw - 72px));
  }

  .map-intro {
    place-content: start center;
    padding-top: 16vh;
  }

  .map-intro__title {
    font-size: 2.1rem;
  }

  .map-intro__sub {
    font-size: 0.92rem;
  }

  .legend__title {
    display: none;
  }

  .legend__item {
    margin: 0;
    font-size: 0.65rem;
    gap: 5px;
    line-height: 1.1;
  }

  .legend__art {
    width: 22px;
    height: 22px;
  }

  .legend__pin {
    width: 16px;
    height: 16px;
  }

  .legend__pin svg {
    width: 9px;
    height: 9px;
  }

  .card {
    grid-template-columns: 96px 1fr;
  }

  .modal {
    max-width: 100%;
    margin: 0;
    height: 100%;
  }

  .modal__sheet {
    border-radius: 0;
    max-height: 100%;
    height: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
