/* ═══════════════════════════════════════════════════════════════
   Ruta de Cenotes — Joy Tree Akumal
   Corredor Playa del Carmen → Tulum · Tablet & Web
   (mismos estilos/colores que el Mapa de Competencia de Joy Tree)
═══════════════════════════════════════════════════════════════ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --brand-dark:   #0a1710;
  --brand-forest: #111f17;
  --brand-mid:    #1c3826;
  --brand-gold:   #c8b87a;
  --brand-gold-d: #9a8850;
  --brand-text:   #e8e0cc;
  --brand-muted:  #738a7c;
  --brand-border: rgba(200,184,122,0.13);
  --brand-hover:  rgba(200,184,122,0.055);
  --header-h:     68px;
  --sidebar-w:          360px;
  --radius:       10px;
  --radius-sm:    6px;
  --card-anim:    260ms cubic-bezier(0.22,1,0.36,1);
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html, body { height:100%; overflow:hidden; }
body {
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 14px;
  background: var(--brand-dark);
  color: var(--brand-text);
  -webkit-font-smoothing: antialiased;
}
button { cursor:pointer; border:none; background:none; font-family:inherit; color:inherit; }
input  { font-family:inherit; }

/* ── Accesibilidad: foco de teclado ───────────────────────────
   Pines del mapa y filas de la lista son <div> con tabindex, no
   elementos nativos — sin este anillo serían invisibles al
   navegar con Tab. :focus-visible evita mostrarlo en clics de mouse. */
:focus-visible {
  outline: 2px solid var(--brand-gold);
  outline-offset: 2px;
  border-radius: 4px;
}
.cenote-pin:focus-visible .cenote-pin-bubble,
.comp-pin:focus-visible .comp-pin-btn {
  outline: 2px solid var(--brand-gold);
  outline-offset: 3px;
}
.li-row:focus-visible { outline-offset: -2px; }

/* ── App shell ─────────────────────────────────────────────── */
.app { display:flex; flex-direction:column; height:100vh; overflow:hidden; }

/* ═══════════════════════════════════════════════════════════════
   HEADER
═══════════════════════════════════════════════════════════════ */
.header {
  height: var(--header-h);
  background: linear-gradient(180deg, #142519 0%, var(--brand-forest) 100%);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 18px;
  flex-shrink: 0;
  z-index: 30;
  position: relative;
  box-shadow: 0 6px 18px rgba(0,0,0,0.28);
}
.header::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, rgba(200,184,122,0.5) 0%, var(--brand-border) 32%, var(--brand-border) 68%, rgba(200,184,122,0.5) 100%);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  padding-right: 18px;
  border-right: 1px solid var(--brand-border);
  height: 40px;
}
.brand-mark {
  width: 44px; height: 44px;
  padding: 5px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand-mid), var(--brand-gold-d));
  border: 1px solid rgba(200,184,122,0.38);
  box-shadow: 0 3px 10px rgba(0,0,0,0.35), 0 0 0 3px rgba(200,184,122,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-gold);
  flex-shrink: 0;
  overflow: hidden;
}
.brand-mark img { width:100%; height:100%; object-fit:contain; }
.brand-copy { display: flex; flex-direction: column; gap: 2px; }
.header-title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--brand-text);
  white-space: nowrap;
  line-height: 1.15;
}
.header-sub {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--brand-muted);
  letter-spacing: 0.25px;
  white-space: nowrap;
}
.header-sub-sep { color: var(--brand-gold); opacity: 0.6; margin: 0 1px; }

/* Filtros */
.header-filters {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}
.header-filters::-webkit-scrollbar { display:none; }

.filter-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(232,224,204,0.62);
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--brand-border);
  white-space: nowrap;
  transition: background 150ms, border-color 150ms, color 150ms, box-shadow 150ms, transform 150ms;
  flex-shrink: 0;
}
.filter-pill:hover {
  color: var(--brand-text);
  border-color: rgba(200,184,122,0.28);
  background: var(--brand-hover);
  transform: translateY(-1px);
}
.filter-pill.is-active {
  color: var(--brand-gold);
  border-color: rgba(200,184,122,0.45);
  background: rgba(200,184,122,0.12);
  box-shadow: 0 3px 10px rgba(0,0,0,0.25), inset 0 0 0 1px rgba(200,184,122,0.08);
}
.filter-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 5px currentColor;
}
.filter-dot--all      { background: var(--brand-gold); }
.filter-dot--cenotes   { background: #5ec8e8; }
.filter-dot--playas    { background: #2fbfb0; }
.filter-dot--hoteles   { background: #e0935f; }
.filter-star { color: var(--brand-gold); font-size: 12px; line-height: 1; }
.filter-count {
  font-size: 10px;
  font-weight: 700;
  color: inherit;
  opacity: 0.6;
}
.filter-pill.is-active .filter-count { opacity: 0.9; }

/* Search */
.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  height: 36px;
  background: rgba(255,255,255,0.045);
  border: 1px solid var(--brand-border);
  border-radius: 999px;
  flex-shrink: 0;
  width: 210px;
  transition: border-color 150ms, width 250ms, box-shadow 150ms, background 150ms;
}
.header-search:focus-within {
  border-color: rgba(200,184,122,0.45);
  background: rgba(255,255,255,0.06);
  box-shadow: 0 0 0 3px rgba(200,184,122,0.1);
  width: 250px;
}
.header-search svg { width:14px; height:14px; color:var(--brand-muted); flex-shrink:0; }
.header-search:focus-within svg { color: var(--brand-gold); }
.header-search input {
  flex:1; background:none; border:none; outline:none;
  font-size:12.5px; color:var(--brand-text);
}
.header-search input::placeholder { color:var(--brand-muted); }
.search-clear {
  display:flex; align-items:center; justify-content:center;
  width:16px; height:16px; flex-shrink:0;
  color:var(--brand-muted); border-radius:50%;
  transition: color 130ms, background 130ms;
}
.search-clear svg { width:11px; height:11px; }
.search-clear:hover { color:var(--brand-text); background:rgba(255,255,255,0.08); }
.search-clear[hidden] { display:none; }

/* Toggle sidebar (mobile) */
.toggle-btn {
  width:36px; height:36px;
  border-radius: 999px;
  display:none; align-items:center; justify-content:center;
  color:var(--brand-muted); flex-shrink:0;
  border: 1px solid transparent;
  transition:all 150ms;
}
.toggle-btn svg { width:16px; height:16px; }
.toggle-btn:hover { color:var(--brand-gold); border-color: var(--brand-border); background:var(--brand-hover); }

/* Selector de idioma — muestra el código del OTRO idioma como invitación a cambiar */
.lang-toggle {
  flex-shrink: 0;
  width: 34px; height: 34px;
  border-radius: 999px;
  border: 1px solid var(--brand-border);
  background: rgba(255,255,255,0.03);
  color: var(--brand-muted);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  transition: all 150ms;
}
.lang-toggle:hover { color: var(--brand-gold); border-color: rgba(200,184,122,0.4); background: var(--brand-hover); }

/* ═══════════════════════════════════════════════════════════════
   BODY
═══════════════════════════════════════════════════════════════ */
.app-body { display:flex; flex:1; overflow:hidden; }

/* ═══════════════════════════════════════════════════════════════
   MAPA
═══════════════════════════════════════════════════════════════ */
.map-wrap { flex:1; position:relative; }
#map { width:100%; height:100%; }

/* FABs sobre mapa */
.map-fabs {
  position:absolute; top:14px; left:14px;
  display:flex; flex-direction:column; gap:6px; z-index:5;
}
.map-fab {
  width:36px; height:36px;
  border-radius:var(--radius-sm);
  background:rgba(10,23,16,0.90);
  border:1px solid var(--brand-border);
  color:var(--brand-muted);
  display:flex; align-items:center; justify-content:center;
  backdrop-filter:blur(10px);
  transition:all 150ms;
}
.map-fab svg { width:15px; height:15px; }
.map-fab:hover { color:var(--brand-gold); border-color:rgba(200,184,122,0.36); background:rgba(28,56,38,0.92); }

/* Chip contador */
.map-chip {
  position:absolute; bottom:26px; left:50%; transform:translateX(-50%);
  background:rgba(10,23,16,0.88); border:1px solid var(--brand-border);
  color:var(--brand-muted); font-size:11px; padding:4px 14px;
  border-radius:20px; backdrop-filter:blur(8px);
  pointer-events:none; z-index:5; white-space:nowrap;
}
.map-chip span { color:var(--brand-gold); font-weight:700; }
.map-chip[hidden] { display:none; }

/* Marca TAO — respaldo discreto, esquina inferior izquierda del mapa */
.map-watermark {
  position: absolute;
  bottom: 14px;
  left: 14px;
  width: 34px;
  height: 34px;
  opacity: 0.82;
  z-index: 5;
  pointer-events: none;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
}
.map-watermark img { width:100%; height:100%; object-fit:contain; display:block; }

.route-chip {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 8px 5px 14px;
}
.route-chip-dot {
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
  box-shadow: 0 0 5px currentColor;
}
.route-chip-sep { opacity: 0.5; }
#routeChipLabel { color: var(--brand-text); font-weight: 700; }
#routeChipMeta { color: var(--brand-gold); font-weight: 700; }
.route-chip-close {
  display: flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0;
  color: var(--brand-muted);
  transition: color 130ms, background 130ms;
  margin-left: 2px;
}
.route-chip-close svg { width: 11px; height: 11px; }
.route-chip-close:hover { color: var(--brand-text); background: rgba(255,255,255,0.1); }

/* MapLibre overrides */
.maplibregl-ctrl-attrib { font-size:10px !important; }
.maplibregl-ctrl-bottom-right { bottom:28px; }

/* ═══════════════════════════════════════════════════════════════
   MARCADORES — hoteles de referencia y ancla Joy Tree
═══════════════════════════════════════════════════════════════ */
.comp-pin {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}

.comp-pin-btn {
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.88);
  box-shadow: 0 3px 14px rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
  transition: transform 200ms cubic-bezier(0.34,1.56,0.64,1),
              box-shadow 200ms ease;
  position: relative;
  z-index: 2;
  overflow: hidden;
}
.comp-pin-btn img {
  width: 86%; height: 86%;
  object-fit: contain;
  border-radius: 0;
}

.comp-pin-stem {
  width: 2px; height: 8px;
  border-radius: 1px;
  margin-top: -1px;
  z-index: 1;
  opacity: 0.75;
}

.comp-pin-label {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  background: rgba(10,23,16,0.92);
  border: 1px solid var(--brand-border);
  color: var(--brand-text);
  font-size: 11px; font-weight: 600;
  white-space: nowrap;
  padding: 3px 9px;
  border-radius: 4px;
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms, transform 160ms;
}

.comp-pin:hover .comp-pin-btn,
.comp-pin.is-active .comp-pin-btn,
.comp-pin.is-hover-glow .comp-pin-btn {
  transform: translateY(-4px) scale(1.12);
  box-shadow: 0 8px 24px rgba(0,0,0,0.65), 0 0 0 4px rgba(255,255,255,0.12);
}
.comp-pin.is-favorite .comp-pin-btn {
  outline: 2px solid var(--brand-gold);
  outline-offset: 2px;
}
.comp-pin.is-hover-glow .comp-pin-label {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Joy Tree — ancla del corredor, siempre visible */
.comp-pin--joytree .comp-pin-btn {
  width: 62px; height: 62px;
  border-width: 4px;
  border-color: var(--brand-gold);
  box-shadow:
    0 0 0 8px rgba(200,184,122,0.14),
    0 6px 24px rgba(0,0,0,0.7);
  font-size: 26px;
  animation: jtPulse 3s ease-in-out infinite;
}
.comp-pin--joytree .comp-pin-label {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--brand-gold);
  background: rgba(10,23,16,0.96);
  border-color: rgba(200,184,122,0.45);
  padding: 4px 12px;
  white-space: nowrap;
}
.comp-pin--joytree::before {
  content: attr(data-badge);
  text-transform: uppercase;
  position: absolute;
  top: -10px; right: -34px;
  background: var(--brand-gold);
  color: #0a1710;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.6px;
  padding: 2px 5px;
  border-radius: 4px;
  line-height: 1;
  font-family: system-ui, sans-serif;
  z-index: 5;
  pointer-events: none;
  white-space: nowrap;
}
.comp-pin--joytree .comp-pin-stem {
  width: 3px; height: 12px;
  background: var(--brand-gold) !important;
  opacity: 1;
}

/* Hoteles de referencia */
.comp-pin--landmark .comp-pin-btn {
  width: 38px; height: 38px;
  border-width: 2px;
  font-size: 16px;
}
.comp-pin--landmark .comp-pin-label {
  font-weight: 600;
  color: rgba(232,224,204,0.85);
}

@keyframes jtPulse {
  0%,100% {
    box-shadow: 0 0 0 8px rgba(200,184,122,0.14), 0 6px 24px rgba(0,0,0,0.7);
  }
  50% {
    box-shadow: 0 0 0 16px rgba(200,184,122,0.04), 0 6px 24px rgba(0,0,0,0.7);
  }
}

/* ═══════════════════════════════════════════════════════════════
   SIDEBAR
═══════════════════════════════════════════════════════════════ */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--brand-forest);
  border-left: 1px solid var(--brand-border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative; /* ancla para .view-detail (position:absolute; inset:0) */
}

.view-list {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.sidebar-head {
  display:flex; align-items:center; justify-content:space-between;
  padding: 13px 16px 10px;
  border-bottom: 1px solid var(--brand-border);
  flex-shrink: 0;
}
.sh-title { font-size:13px; font-weight:700; }
.sh-badge {
  font-size:11px; font-weight:700; color:var(--brand-gold);
  background:rgba(200,184,122,0.10); border:1px solid rgba(200,184,122,0.22);
  border-radius:12px; padding:2px 9px;
}

/* Lista */
.prop-list {
  flex:1; overflow-y:auto; overflow-x:hidden;
  scrollbar-width:thin; scrollbar-color:var(--brand-border) transparent;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.prop-list::-webkit-scrollbar { width:3px; }
.prop-list::-webkit-scrollbar-thumb { background:var(--brand-border); border-radius:2px; }

/* Tarjeta de punto de interés */
.list-item {
  border-radius: var(--radius);
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--brand-border);
  border-left: 3px solid transparent;
  transition: background 150ms, border-color 150ms, box-shadow 200ms;
}
.list-item:hover { background:var(--brand-hover); }
.list-item.is-active {
  background: rgba(200,184,122,0.055);
  border-color: rgba(200,184,122,0.3);
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}
.list-item.is-hidden { display:none; }

.li-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 14px 13px;
  cursor: pointer;
  min-height: 68px;
}

.li-icon {
  width:40px; height:40px; border-radius:50%; flex-shrink:0;
  display:flex; align-items:center; justify-content:center;
  font-size:18px; border:2px solid rgba(255,255,255,0.2);
  box-shadow:0 2px 8px rgba(0,0,0,0.3);
}
.li-icon img { width:78%; height:78%; object-fit:contain; border-radius:0; }
.li-icon--photo { padding:0; overflow:hidden; }
.li-icon--photo img { width:100%; height:100%; object-fit:cover; border-radius:50%; }

.list-item.is-hover { background:var(--brand-hover); }
.list-item.is-hover .li-chevron { opacity:1; }

.li-info { flex:1; min-width:0; }
.li-top { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:5px; }
.li-name {
  font-size:13.5px; font-weight:700;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
  color:var(--brand-text);
  min-width:0; flex:1 1 auto;
}
.list-item.is-joytree .li-name { color:var(--brand-gold); }
.li-meta {
  display:flex; align-items:center; gap:6px; min-width:0;
  font-size:11.5px; color:rgba(232,224,204,0.5);
}
.li-cat { white-space:nowrap; flex-shrink:0; }
.li-dot { flex-shrink:0; opacity:0.6; }
.li-price {
  color:rgba(200,184,122,0.85); font-weight:600;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
  min-width:0; flex:1 1 auto;
}

.li-distance {
  display: flex; align-items: center; gap: 3px;
  font-size:10px; font-weight:700; color: var(--brand-gold);
  background: rgba(200,184,122,0.10); border:1px solid rgba(200,184,122,0.22);
  border-radius:10px; padding:2px 7px; white-space:nowrap; flex-shrink:0;
}

.li-chevron { color:var(--brand-muted); opacity:0; flex-shrink:0; transition:opacity 130ms, color 200ms; }
.li-chevron svg { width:13px; height:13px; }
.list-item:hover .li-chevron { opacity:1; }
.list-item.is-active .li-chevron { opacity:1; color:var(--brand-gold); }

/* Botón de favorito (estrella) — en la lista y en la ficha */
.li-fav {
  display: flex; align-items:center; justify-content:center;
  width: 23px; height: 23px; flex-shrink: 0;
  color: rgba(232,224,204,0.22);
  border-radius: 50%;
  transition: color 150ms, transform 150ms, background 150ms;
}
.li-fav svg { width: 14px; height: 14px; }
.li-fav:hover { color: var(--brand-gold); background: rgba(200,184,122,0.1); }
.li-fav.is-favorite { color: var(--brand-gold); }
.li-fav.is-favorite:hover { transform: scale(1.12); }

/* Botón "+" para agregar/quitar de "Mi ruta" (itinerario) */
.li-itin {
  display: flex; align-items:center; justify-content:center;
  width: 22px; height: 22px; flex-shrink: 0;
  border-radius: 50%;
  border: 1.5px solid var(--brand-border);
  color: rgba(232,224,204,0.4);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  transition: color 150ms, border-color 150ms, background 150ms, transform 150ms;
}
.li-itin:hover { color: var(--brand-gold); border-color: rgba(200,184,122,0.4); background: rgba(200,184,122,0.08); }
.li-itin.is-on { color: #0a1710; background: var(--brand-gold); border-color: var(--brand-gold); }
.li-itin.is-on:hover { transform: scale(1.1); }

/* ═══════════════════════════════════════════════════════════════
   BARRA DE ITINERARIO — Joy Tree → parada 1 → parada 2 → ...
═══════════════════════════════════════════════════════════════ */
.itinerary-bar {
  margin: 0 12px 10px;
  padding: 12px 13px;
  background: rgba(200,184,122,0.05);
  border: 1px solid rgba(200,184,122,0.25);
  border-radius: var(--radius);
  flex-shrink: 0;
}
.itinerary-bar__head { display:flex; align-items:center; gap:8px; margin-bottom: 9px; }
.itinerary-bar__title { font-size: 12px; font-weight: 700; color: var(--brand-gold); }
.itinerary-bar__count {
  font-size: 10px; font-weight: 700; color: var(--brand-gold);
  background: rgba(200,184,122,0.12); border-radius: 10px;
  padding: 1px 7px;
}
.itinerary-bar__clear {
  margin-left: auto;
  font-size: 10.5px; font-weight: 700; color: var(--brand-muted);
  text-transform: uppercase; letter-spacing: 0.04em;
  transition: color 130ms;
}
.itinerary-bar__clear:hover { color: var(--brand-text); }
.itinerary-bar__stops { display:flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.itin-chip {
  display: flex; align-items: center; gap: 6px;
  font-size: 11.5px; color: var(--brand-text);
  background: rgba(255,255,255,0.03); border: 1px solid var(--brand-border);
  border-radius: var(--radius-sm); padding: 6px 8px;
}
.itin-chip__remove {
  margin-left: auto;
  width: 16px; height: 16px; flex-shrink: 0;
  display:flex; align-items:center; justify-content:center;
  color: var(--brand-muted); border-radius: 50%;
  font-size: 13px; line-height: 1;
  transition: color 130ms, background 130ms;
}
.itin-chip__remove:hover { color: var(--brand-text); background: rgba(255,255,255,0.1); }
.itinerary-bar__cta {
  width: 100%;
  padding: 9px;
  border-radius: 999px;
  background: rgba(200,184,122,0.14);
  border: 1.5px solid var(--brand-gold);
  color: var(--brand-gold);
  font-size: 11px; font-weight: 800;
  letter-spacing: 0.05em; text-transform: uppercase;
  transition: background 150ms, transform 150ms;
}
.itinerary-bar__cta:hover { background: rgba(200,184,122,0.22); transform: translateY(-1px); }
.itinerary-bar__total {
  margin-top: 8px; text-align: center;
  font-size: 11px; font-weight: 700; color: var(--brand-text);
}

/* Empty state */
.list-empty {
  display:none; padding:48px 24px; text-align:center; color:var(--brand-muted);
}
.list-empty.is-visible { display:block; }
.list-empty svg { width:30px; height:30px; margin-bottom:10px; opacity:0.35; }
.list-empty p { font-size:13px; }

/* ═══════════════════════════════════════════════════════════════
   MARCADORES DE CENOTES
═══════════════════════════════════════════════════════════════ */
.cenote-pin {
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: auto;
  user-select: none;
  cursor: pointer;
}

.cenote-pin-bubble {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #72d4f0, #1a8aac);
  border: 2px solid rgba(150, 225, 248, 0.88);
  box-shadow: 0 0 8px rgba(80, 190, 230, 0.55), 0 2px 6px rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  line-height: 1;
  flex-shrink: 0;
  transition: transform 160ms, box-shadow 160ms;
}

.cenote-pin:hover .cenote-pin-bubble,
.cenote-pin.is-active .cenote-pin-bubble,
.cenote-pin.is-hover-glow .cenote-pin-bubble {
  transform: translateY(-3px) scale(1.18);
  box-shadow: 0 0 12px rgba(80, 190, 230, 0.85), 0 4px 14px rgba(0,0,0,0.55), 0 0 0 4px rgba(114,212,240,0.18);
}

.cenote-pin.is-favorite .cenote-pin-bubble {
  outline: 2px solid var(--brand-gold);
  outline-offset: 2px;
}

.cenote-pin.is-active .cenote-pin-name,
.cenote-pin.is-hover-glow .cenote-pin-name {
  color: #d6f4ff;
}

/* Miniatura real (heroImg) en vez del emoji 💧, cuando ya hay foto */
.cenote-pin-bubble--photo {
  padding: 0;
  overflow: hidden;
  background: none;
}
.cenote-pin-bubble--photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.cenote-pin-stem {
  width: 1px;
  height: 8px;
  background: linear-gradient(to bottom, rgba(114,212,240,0.6), transparent);
}

.cenote-pin-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(114,212,240,0.5);
}

.cenote-pin-name {
  position: absolute;
  bottom: calc(100% + 2px);
  top: auto;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: rgba(160, 230, 248, 0.92);
  text-shadow: 0 1px 4px rgba(0,0,0,0.75), 0 0 8px rgba(0,0,0,0.5);
  pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════════
   BADGE DE DISTANCIA — línea punteada desde Joy Tree
═══════════════════════════════════════════════════════════════ */
.route-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(10,23,16,0.94);
  border: 1px solid rgba(200,184,122,0.5);
  color: var(--brand-gold);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2px;
  padding: 5px 10px;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0,0,0,0.5);
  pointer-events: none;
  user-select: none;
  animation: routeBadgeIn 200ms cubic-bezier(0.22,1,0.36,1);
}
.route-badge-sep { color: var(--brand-muted); font-weight: 400; }
.route-badge-time { color: var(--brand-text); }
.route-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 4px currentColor;
}

@keyframes routeBadgeIn {
  from { opacity: 0; transform: scale(0.85); }
  to   { opacity: 1; transform: scale(1); }
}

/* ═══════════════════════════════════════════════════════════════
   ETIQUETAS GEOGRÁFICAS (municipios / zonas)
═══════════════════════════════════════════════════════════════ */
.geo-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  user-select: none;
}

.geo-label-text {
  background: rgba(10,23,16,0.72);
  border: 1px solid rgba(200,184,122,0.22);
  color: rgba(232,224,204,0.7);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 4px 11px;
  border-radius: 20px;
  backdrop-filter: blur(6px);
  white-space: nowrap;
  line-height: 1;
}

.geo-label-line {
  width: 1px;
  height: 18px;
  background: linear-gradient(to bottom, rgba(200,184,122,0.35), transparent);
}

.geo-label-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(200,184,122,0.45);
  border: 1px solid rgba(200,184,122,0.3);
}

/* ═══════════════════════════════════════════════════════════════
   TAGS DE ESTADO
═══════════════════════════════════════════════════════════════ */
.status-tag {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 10px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.status-tag--lg { font-size: 10px; padding: 5px 12px; border-radius: 12px; }
.status-tag--info { background: rgba(94,200,232,0.12);  color: #8fdcf5; border-color: rgba(94,200,232,0.35); }
.status-tag--warn { background: rgba(224,147,95,0.14);  color: #f0b083; border-color: rgba(224,147,95,0.4); }
.status-tag--good { background: rgba(47,191,176,0.14);  color: #6be0d0; border-color: rgba(47,191,176,0.4); }
.detail-status-row { display:flex; gap:8px; flex-wrap:wrap; margin-bottom: 16px; }

/* ═══════════════════════════════════════════════════════════════
   FICHA DE DETALLE — reemplaza la lista al seleccionar un punto
═══════════════════════════════════════════════════════════════ */
.view-detail {
  position: absolute;
  inset: 0;
  background: var(--brand-forest);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: detailSlideIn var(--card-anim);
}
.view-detail[hidden] { display: none; }
@keyframes detailSlideIn { from { transform: translateX(24px); opacity:0; } to { transform:none; opacity:1; } }

.detail-back-btn {
  display: flex; align-items:center; justify-content:center;
  width: 30px; height: 30px;
  border-radius: 50%;
  color: #0a1710;
  flex-shrink: 0;
  transition: background 150ms;
}
.detail-back-btn:hover { background: rgba(255,255,255,0.2); }
.detail-back-btn svg { width:16px; height:16px; }

.detail-head {
  color: #0a1710;
  padding: 16px 18px 18px;
  border-bottom: 3px solid var(--brand-gold);
  flex-shrink: 0;
}
.detail-head__top { display:flex; align-items:center; gap:10px; margin-bottom: 14px; }
.detail-head__top .li-fav { color: rgba(10,23,16,0.4); }
.detail-head__top .li-fav:hover { color: #0a1710; background: rgba(0,0,0,0.1); }
.detail-head__top .li-fav.is-favorite { color: #0a1710; }
.detail-head__topbar-label {
  flex: 1;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.75;
}
.detail-head__id { display:flex; align-items:center; gap:12px; }

.detail-head__avatar {
  width: 46px; height: 46px;
  border-radius: 50%;
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
  border: 2px solid rgba(255,255,255,0.7);
  box-shadow: 0 3px 10px rgba(0,0,0,0.25);
}
.detail-head__avatar--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.18);
  font-size: 20px;
}
.detail-head__avatar--logo { display:flex; align-items:center; justify-content:center; }
.detail-head__avatar--logo img { width:78%; height:78%; object-fit:contain; }

.detail-head__id-text { min-width: 0; }
.detail-head__name {
  font-size: 17px;
  font-weight: 800;
  line-height: 1.25;
}

.detail-body { flex:1; overflow-y:auto; padding: 18px; }

.detail-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}
.detail-stat {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--brand-border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}
.detail-stat__lbl {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-muted);
  margin-bottom: 3px;
  display: block;
}
.detail-stat__val { font-size: 14px; font-weight: 800; color: var(--brand-text); }

.detail-summary {
  font-size: 12.5px;
  color: rgba(232,224,204,0.85);
  line-height: 1.55;
  margin-bottom: 18px;
}

.detail-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 18px 18px;
  border-top: 1px solid var(--brand-border);
  flex-shrink: 0;
}
.detail-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 999px;
  background: rgba(200,184,122,0.10);
  border: 1.5px solid var(--brand-gold);
  color: var(--brand-text);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 150ms, transform 150ms;
}
.detail-btn:hover { background: rgba(200,184,122,0.2); transform: translateY(-1px); }
.detail-btn svg { width:13px; height:13px; }
.detail-btn--ghost {
  background: rgba(255,255,255,0.02);
  border-color: var(--brand-border);
  color: rgba(232,224,204,0.75);
}
.detail-btn--ghost:hover { background: rgba(255,255,255,0.05); border-color: rgba(200,184,122,0.4); }

.print-sheet { display: none; }

/* ── Galería de medios ────────────────────────────────────── */
.detail-media { margin-top: 4px; }
.detail-media__title {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-gold);
  margin-bottom: 10px;
}
.detail-media__empty {
  font-size: 12px;
  color: var(--brand-muted);
  font-weight: 600;
  background: rgba(255,255,255,0.02);
  border: 1px dashed var(--brand-border);
  border-radius: var(--radius-sm);
  padding: 14px;
  text-align: center;
}
.media-group { margin-bottom: 16px; }
.media-group:last-child { margin-bottom: 0; }
.media-group__head { display: flex; align-items: center; gap: 7px; margin-bottom: 8px; }
.media-group__head svg { width: 13px; height: 13px; color: var(--brand-muted); flex-shrink: 0; }
.media-group__label { font-size: 10.5px; font-weight: 800; letter-spacing: 0.04em; color: var(--brand-text); }
.media-group__count {
  font-size: 10px;
  font-weight: 700;
  color: var(--brand-muted);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--brand-border);
  border-radius: 10px;
  padding: 1px 7px;
  margin-left: auto;
}

.media-thumb--extra { display: none; }
.media-group.is-expanded .media-thumb--extra { display: block; }
.media-group__toggle {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 8px;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--brand-border);
  background: rgba(255,255,255,0.02);
  color: var(--brand-gold);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-align: center;
  transition: background 150ms, border-color 150ms;
}
.media-group__toggle:hover { background: rgba(200,184,122,0.08); border-color: var(--brand-gold); }
.media-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.media-thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-sm);
  border: 1px solid var(--brand-border);
  background-color: rgba(255,255,255,0.02);
  background-size: cover;
  background-position: center;
  overflow: hidden;
  transition: transform 150ms, box-shadow 150ms;
}
.media-thumb:hover { transform: scale(1.03); box-shadow: 0 4px 14px rgba(0,0,0,0.4); }
.media-thumb__video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  pointer-events: none;
  background: #0a1710;
}
.media-thumb__play {
  position: absolute; inset: 0;
  display: flex; align-items:center; justify-content:center;
  background: rgba(0,0,0,0.3);
  color: #fff;
}
.media-thumb__play svg { width:22px; height:22px; filter: drop-shadow(0 1px 3px rgba(0,0,0,0.5)); }

/* ── Lightbox ─────────────────────────────────────────────── */
.lightbox {
  position: fixed; inset: 0;
  z-index: 2000;
  background: rgba(5,8,6,0.94);
  display: none;
  align-items: center; justify-content: center;
  padding: 40px;
}
.lightbox.is-open { display: flex; animation: lightboxFade 200ms ease; }
@keyframes lightboxFade { from { opacity:0; } to { opacity:1; } }
.lightbox__stage { max-width: 100%; max-height: 100%; display:flex; align-items:center; justify-content:center; }
.lightbox__stage img,
.lightbox__stage video {
  max-width: 100%;
  max-height: 82vh;
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.lightbox__close {
  position: absolute; top: 20px; right: 20px;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  color: #fff;
  display:flex; align-items:center; justify-content:center;
  transition: background 150ms;
}
.lightbox__close:hover { background: rgba(255,255,255,0.24); }
.lightbox__close svg { width:18px; height:18px; }
.lightbox__nav {
  position: absolute; top: 50%;
  transform: translateY(-50%);
  width: 46px; height: 46px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  color: #fff;
  display:flex; align-items:center; justify-content:center;
  transition: background 150ms;
}
.lightbox__nav:hover { background: rgba(255,255,255,0.24); }
.lightbox__nav svg { width:20px; height:20px; }
.lightbox__nav--prev { left: 20px; }
.lightbox__nav--next { right: 20px; }

/* ═══════════════════════════════════════════════════════════════
   MODAL DE BIENVENIDA — primera visita o botón "?" sobre el mapa
═══════════════════════════════════════════════════════════════ */
.onboarding {
  position: fixed; inset: 0;
  z-index: 2500;
  background: rgba(5,8,6,0.72);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.onboarding[hidden] { display: none; }
.onboarding-card {
  background: var(--brand-forest);
  border: 1px solid var(--brand-border);
  border-radius: var(--radius);
  padding: 30px 26px 26px;
  max-width: 380px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.55);
  animation: onboardIn 260ms cubic-bezier(0.22,1,0.36,1);
}
@keyframes onboardIn { from { opacity: 0; transform: scale(0.94); } to { opacity: 1; transform: none; } }
.onboarding-logo { width: 52px; height: 52px; object-fit: contain; margin-bottom: 16px; }
.onboarding-card h2 { font-size: 16px; font-weight: 800; color: var(--brand-text); margin-bottom: 18px; line-height: 1.3; }
.onboarding-steps { list-style: none; text-align: left; display: flex; flex-direction: column; gap: 12px; margin-bottom: 22px; }
.onboarding-steps li { font-size: 12.5px; color: rgba(232,224,204,0.85); line-height: 1.5; display: flex; gap: 10px; align-items: flex-start; }
.onboarding-emoji { flex-shrink: 0; font-size: 15px; line-height: 1.4; }
.onboarding-btn {
  width: 100%;
  padding: 12px;
  border-radius: 999px;
  background: var(--brand-gold);
  color: #0a1710;
  font-weight: 800;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: transform 150ms, box-shadow 150ms;
}
.onboarding-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(200,184,122,0.35); }

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  :root { --sidebar-w: 300px; }
}

@media (max-width: 768px) {
  :root { --sidebar-w: 100%; --header-h: 52px; }

  .app-body { flex-direction: column; }
  .map-wrap { flex:none; height:52vh; min-height:280px; min-width:0; }

  .sidebar {
    width:100%; min-width:0; border-left:none; border-top:1px solid var(--brand-border); flex:1;
  }
  .sidebar.is-collapsed { display:none; }

  .toggle-btn { display:flex; }

  .header { gap: 10px; padding: 0 12px; }
  .header-brand { padding-right: 10px; gap: 8px; }
  .brand-mark { width: 36px; height: 36px; border-radius: 9px; }
  .header-title { font-size: 14px; }
  .header-search { width:140px; }
  .header-search:focus-within { width:160px; }
  .header-sub { display:none; }

  .detail-stats { grid-template-columns: 1fr 1fr; }
  .media-grid   { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .lightbox { padding: 54px 14px; }
  .lightbox__nav { width: 38px; height: 38px; }
  .lightbox__nav--prev { left: 8px; }
  .lightbox__nav--next { right: 8px; }
  .lightbox__close { top: 10px; right: 10px; }
}

@media (max-width: 480px) {
  .header-search { display:none; }
}

/* ═══════════════════════════════════════════════════════════════
   HOJA IMPRIMIBLE — página propia con foto, banda de marca, stats
   y galería, pensada para el mostrador de concierge (o para que el
   huésped se la lleve/mande como PDF). No es el panel interactivo
   con estilos recortados: es su propio layout de una columna.
═══════════════════════════════════════════════════════════════ */
.print-sheet__hero,
.print-sheet__gallery img { -webkit-print-color-adjust: exact; print-color-adjust: exact; }

@media print {
  @page { size: A4 portrait; margin: 0; }

  body * { visibility: hidden; }
  .print-sheet, .print-sheet * { visibility: visible; }

  html, body { background: #fff; }
  .print-sheet {
    display: block;
    /* fixed (no absolute): así ignora el ancho angosto del .sidebar
       donde vive en el DOM y cubre toda la página — un elemento
       position:absolute tomaría al .sidebar (position:relative) como
       referencia y quedaría encajonado en sus 360px, aunque esté
       invisible el resto del documento sigue ocupando su layout. */
    position: fixed; inset: 0;
    width: auto;
    background: #fff;
    color: #1a1a1a;
    font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .print-sheet__hero {
    display: block;
    width: 100%;
    height: 260px;
    object-fit: cover;
  }

  .print-sheet__band {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 40px;
    border-bottom: 3px solid #0a1710;
  }
  .print-sheet__logo { width: 36px; height: 36px; object-fit: contain; border-radius: 50%; background: #fff; }
  .print-sheet__kicker {
    flex: 1;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #0a1710;
  }
  .print-sheet__cat {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    color: #0a1710;
    background: rgba(255,255,255,0.55);
    padding: 4px 12px;
    border-radius: 12px;
    border: 1.5px solid #0a1710;
  }

  .print-sheet__body { padding: 28px 40px 34px; }

  .print-sheet__name {
    font-size: 34px;
    font-weight: 800;
    color: #0a1710;
    margin-bottom: 14px;
  }

  .print-sheet__tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
  .print-sheet__tag {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #0a1710;
    background: #f0ead8;
    border: 1px solid #c8b87a;
    border-radius: 10px;
    padding: 4px 10px;
  }

  .print-sheet__stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
  }
  .print-sheet__stat {
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 10px 12px;
    break-inside: avoid;
  }
  .print-sheet__stat span {
    display: block;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #777;
    margin-bottom: 3px;
  }
  .print-sheet__stat strong { font-size: 15px; color: #0a1710; }

  .print-sheet__summary {
    font-size: 13px;
    line-height: 1.6;
    color: #333;
    margin-bottom: 22px;
  }

  .print-sheet__gallery-title {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #777;
    margin-bottom: 10px;
  }
  .print-sheet__gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 24px;
  }
  .print-sheet__gallery img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #ddd;
    break-inside: avoid;
  }

  .print-sheet__footer {
    border-top: 1px dashed #bbb;
    padding-top: 12px;
    font-size: 11px;
    color: #555;
  }
  .print-sheet__footer p { margin-bottom: 4px; }
  .print-sheet__footer p:last-child { font-weight: 700; color: #0a1710; }
}
