/* Mapa rápido LoChloe — autónomo (sin styles.css de home) */
:root {
  --primary: #4b7462;
  --primary-dark: #3e5131;
  --font-heading: 'Quicksand', system-ui, sans-serif;
  --font-body: 'Nunito', system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body.qm-page {
  margin: 0;
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}
.qm-page .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  font-family: var(--font-body);
  text-decoration: none;
}
.qm-page .btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.qm-topbar .logo-text {
  font-family: var(--font-heading);
  font-weight: 800;
  color: var(--primary-dark);
  font-size: 1.15rem;
}

/* Mapa + panel derecho */
.qm-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: #e8eeeb;
  overflow-x: hidden;
}

.qm-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(75, 116, 98, 0.12);
  z-index: 500;
  flex-shrink: 0;
}

.qm-topbar h1 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--primary, #4b7462);
  margin: 0;
}

.qm-zone-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px 10px;
  padding: 6px 12px 8px;
  background: #fff;
  border-bottom: 1px solid rgba(75, 116, 98, 0.1);
  z-index: 490;
  flex-shrink: 0;
}

.qm-zone-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #4a6358;
  min-width: 120px;
}

.qm-zone-field--barrio { flex: 1; min-width: 140px; max-width: 200px; }
.qm-zone-field--hidden { display: none !important; }

.qm-zone-field select {
  font-size: 0.85rem;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(75, 116, 98, 0.25);
  background: #f8fbf9;
  color: #1a2e26;
}

.qm-zone-bar .qm-zone-apply {
  flex-shrink: 0;
  font-weight: 800;
  border-radius: 12px;
  border-width: 2px;
  border-style: solid;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
}

/* Ver negocios — verde LoChloe */
.qm-zone-bar .qm-zone-apply--negocios {
  background: linear-gradient(135deg, #5a8f76, #4b7462);
  border-color: #3e5131;
  color: #fff;
  box-shadow: 0 2px 10px rgba(75, 116, 98, 0.28);
}

.qm-zone-bar .qm-zone-apply--negocios:hover,
.qm-zone-bar .qm-zone-apply--negocios:focus-visible {
  background: linear-gradient(135deg, #4b7462, #3e5131);
  color: #fff;
  transform: translateY(-1px);
}

/* Ver provincia — salmón / terracota como nav del home */
.qm-zone-bar .qm-zone-apply--provincia {
  background: #f0cdc6;
  border-color: #d4a59c;
  color: #8b5e55;
  box-shadow: 0 2px 8px rgba(156, 88, 85, 0.15);
}

.qm-zone-bar .qm-zone-apply--provincia:hover,
.qm-zone-bar .qm-zone-apply--provincia:focus-visible {
  background: #e8b8af;
  border-color: #c9958a;
  color: #6b3f38;
}

.qm-zone-meta {
  flex-shrink: 0;
  --qm-chips-map-gap: 5mm;
  padding: 2px 12px var(--qm-chips-map-gap);
  background: #fff;
  border-bottom: 1px solid rgba(75, 116, 98, 0.1);
  z-index: 485;
  box-sizing: border-box;
}

.qm-zone-summary {
  margin: 0 0 4px;
  font-size: 0.72rem;
  line-height: 1.25;
  color: #3d5248;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.qm-sum-loc {
  font-weight: 800;
  color: #1a5c42;
}

.qm-sum-stats {
  font-weight: 600;
  color: #5a7568;
}

.qm-sum-mode {
  font-weight: 700;
  color: #1a5c42;
}

@keyframes qm-guardia24-pulse {
  0%,
  100% {
    opacity: 1;
    color: #b71c1c;
  }
  50% {
    opacity: 0.65;
    color: #e53935;
  }
}

.qm-sum-guardia24 {
  font-weight: 800;
  color: #c62828;
  letter-spacing: 0.01em;
  animation: qm-guardia24-pulse 2.5s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .qm-sum-guardia24 {
    animation: none;
    color: #b71c1c;
  }
}

.qm-sum-24hint {
  font-weight: 600;
  color: #7a4a42;
}

.qm-sum-youare {
  font-weight: 800;
  color: #1a5c42;
}

.qm-sum-barrio {
  font-weight: 800;
  color: #2d5a45;
}

.qm-sum-empty {
  font-weight: 600;
  color: #8a6a3a;
}

.qm-sum-sep {
  color: rgba(75, 116, 98, 0.45);
  font-weight: 400;
}

.qm-map-mode-banner {
  display: none !important;
}

@keyframes qm-zone-services-title-pulse {
  0%,
  100% {
    color: #1a2e26;
    opacity: 1;
    transform: scale(1);
  }
  50% {
    color: #8fa99a;
    opacity: 0.55;
    transform: scale(1.018);
  }
}

.qm-zone-services-title {
  margin: 2px 0 calc(4px + 2mm);
  padding: 0 8px;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.25;
  color: #1a2e26;
  letter-spacing: -0.01em;
  text-align: center;
  transform-origin: center center;
  animation: qm-zone-services-title-pulse 2.6s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .qm-zone-services-title {
    animation: none;
  }
}

.qm-zone-services-title[hidden] {
  display: none;
}

.qm-zone-services-row {
  display: flex;
  align-items: center;
  gap: 6px 8px;
  flex-wrap: nowrap;
  margin: 0;
}

.qm-zone-services-block {
  flex: 1 1 auto;
  min-width: 0;
  order: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.qm-zone-services-block .qm-zone-services-title {
  display: block;
  width: 100%;
  max-width: 100%;
  text-align: center;
}

.qm-zone-services-block .qm-zone-services {
  width: 100%;
  max-width: 100%;
  align-self: stretch;
}

.qm-zone-services[hidden] {
  display: none !important;
}

.qm-zone-services-legend {
  margin: 0;
  padding: 8px 12px;
  max-width: 36rem;
  font-size: 0.78rem;
  line-height: 1.45;
  font-weight: 600;
  color: #3d5248;
  text-align: center;
  background: #f3f8f5;
  border: 1px solid rgba(75, 116, 98, 0.22);
  border-radius: 10px;
  box-sizing: border-box;
}

.qm-zone-services-row .qm-mode-24,
.qm-zone-services-row .qm-mode-all {
  order: 2;
  margin-left: auto;
}

.qm-mode-24.lochloe-pill-24-latent {
  flex: 0 0 auto;
  z-index: 5;
  font-size: 0.78rem;
}

.qm-mode-all {
  flex: 0 0 auto;
  padding: 5px 11px;
  border-radius: 999px;
  border: 2px solid #4b7462;
  background: #f7faf8;
  color: #3e5131;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(75, 116, 98, 0.12);
}

.qm-mode-all:hover,
.qm-mode-all:focus-visible {
  background: #eef6f1;
}

.qm-mode-24-legend {
  margin: 0;
  padding: 0 10px 2px;
  font-size: 0.68rem;
  line-height: 1.35;
  font-weight: 600;
  color: #7a4a42;
  text-align: right;
  max-width: 100%;
}

.qm-mode-24-legend[hidden] {
  display: none;
}

.qm-mode-24-legend.is-care-hint {
  text-align: center;
  color: #3d5248;
  font-weight: 700;
  line-height: 1.45;
  padding: 6px 12px 8px;
  background: #f4faf6;
  border-radius: 10px;
  margin: 4px 8px 6px;
  border: 1px solid rgba(75, 116, 98, 0.2);
}


.qm-zone-services {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: flex-start;
  align-content: flex-start;
  justify-content: center;
  gap: 4px 5px;
  overflow: visible;
  width: 100%;
}

.qm-zone-services:has(.qm-svc-row + .qm-svc-row) {
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 4px;
}

.qm-svc-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  justify-content: center;
  gap: 5px 6px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.qm-page button.qm-svc-chip,
.qm-svc-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  box-sizing: border-box;
  width: var(--qm-chip-w, auto);
  flex: 0 0 var(--qm-chip-w, auto);
  max-width: var(--qm-chip-w, none);
  min-width: 0;
  margin: 0;
  padding: 5px 7px;
  border-radius: 10px;
  border: 1px solid rgba(186, 176, 196, 0.45);
  background: #fdfcfe;
  font-size: 0.75rem;
  font-weight: 600;
  color: #4a5568;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset;
  line-height: 1.15;
  font-family: inherit;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.qm-svc-chip:hover,
.qm-svc-chip:focus-visible {
  border-color: rgba(167, 139, 164, 0.55);
  box-shadow: 0 2px 8px rgba(167, 139, 164, 0.12);
}

.qm-svc-chip.is-active {
  border-color: rgba(148, 120, 156, 0.65);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.85), 0 0 0 2px rgba(194, 150, 178, 0.22);
}

.qm-svc-chip.is-empty {
  opacity: 0.88;
  border-style: dashed;
  border-color: rgba(186, 196, 210, 0.55);
  color: #8b95a8;
}
.qm-svc-chip.is-empty .qm-svc-chip-n {
  background: rgba(186, 196, 210, 0.35);
  color: #7b8494;
}
.qm-svc-chip.is-empty.is-active {
  opacity: 1;
  border-style: solid;
}

/* Pasteles suaves — presets core */
.qm-svc-chip[data-preset="todos"] {
  background: #eef8f2;
  border-color: rgba(143, 199, 175, 0.55);
  color: #3d6b58;
}
.qm-svc-chip[data-preset="todos"] .qm-svc-chip-n {
  background: rgba(143, 199, 175, 0.45);
  color: #3d6b58;
}

.qm-svc-chip[data-preset="veterinarias"] {
  background: #eef6fc;
  border-color: rgba(152, 196, 226, 0.6);
  color: #4a6d85;
}
.qm-svc-chip[data-preset="veterinarias"] .qm-svc-chip-n {
  background: rgba(152, 196, 226, 0.5);
  color: #4a6d85;
}

.qm-svc-chip[data-preset="online"] {
  background: #f0f2fc;
  border-color: rgba(176, 186, 232, 0.6);
  color: #5a628a;
}
.qm-svc-chip[data-preset="online"] .qm-svc-chip-n {
  background: rgba(176, 186, 232, 0.45);
  color: #5a628a;
}

.qm-svc-chip[data-preset="internacion"] {
  background: #f5f0fc;
  border-color: rgba(196, 176, 224, 0.55);
  color: #6b5a82;
}
.qm-svc-chip[data-preset="internacion"] .qm-svc-chip-n {
  background: rgba(196, 176, 224, 0.45);
  color: #6b5a82;
}

.qm-svc-chip[data-preset="petshop"],
.qm-svc-chip[data-preset="farmacia"] {
  background: #fff6ee;
  border-color: rgba(232, 196, 168, 0.6);
  color: #8a6a52;
}
.qm-svc-chip[data-preset="petshop"] .qm-svc-chip-n,
.qm-svc-chip[data-preset="farmacia"] .qm-svc-chip-n {
  background: rgba(232, 196, 168, 0.5);
  color: #8a6a52;
}

.qm-svc-chip[data-preset="paseo"] {
  background: #fffbeb;
  border-color: rgba(232, 214, 150, 0.55);
  color: #7a6f45;
}
.qm-svc-chip[data-preset="paseo"] .qm-svc-chip-n {
  background: rgba(232, 214, 150, 0.5);
  color: #7a6f45;
}

.qm-svc-chip[data-preset="vet24"],
.qm-svc-chip[data-preset="hospital24"],
.qm-svc-chip[data-preset="urgencias"] {
  background: #fceef1;
  border-color: rgba(232, 176, 188, 0.55);
  color: #8a5560;
}
.qm-svc-chip[data-preset="vet24"] .qm-svc-chip-n,
.qm-svc-chip[data-preset="hospital24"] .qm-svc-chip-n,
.qm-svc-chip[data-preset="urgencias"] .qm-svc-chip-n {
  background: rgba(232, 176, 188, 0.45);
  color: #8a5560;
}

/* Rubros — un pastel distinto por familia */
.qm-svc-chip[data-preset="rubro_accesorios"] {
  background: #fdf0f5;
  border-color: rgba(232, 190, 210, 0.55);
  color: #8a6275;
}
.qm-svc-chip[data-preset="rubro_accesorios"] .qm-svc-chip-n {
  background: rgba(232, 190, 210, 0.45);
  color: #8a6275;
}

.qm-svc-chip[data-preset="rubro_adiestramiento"] {
  background: #fff4eb;
  border-color: rgba(240, 200, 170, 0.55);
  color: #86624a;
}
.qm-svc-chip[data-preset="rubro_adiestramiento"] .qm-svc-chip-n {
  background: rgba(240, 200, 170, 0.45);
  color: #86624a;
}

.qm-svc-chip[data-preset="rubro_cremacion"] {
  background: #f4f2f8;
  border-color: rgba(200, 194, 216, 0.55);
  color: #6e6878;
}
.qm-svc-chip[data-preset="rubro_cremacion"] .qm-svc-chip-n {
  background: rgba(200, 194, 216, 0.45);
  color: #6e6878;
}

.qm-svc-chip[data-preset="rubro_cuidador"] {
  background: #eef8f4;
  border-color: rgba(168, 214, 192, 0.55);
  color: #4a7562;
}
.qm-svc-chip[data-preset="rubro_cuidador"] .qm-svc-chip-n {
  background: rgba(168, 214, 192, 0.45);
  color: #4a7562;
}

.qm-svc-chip[data-preset="rubro_fotografia"] {
  background: #f2f0fc;
  border-color: rgba(190, 186, 232, 0.55);
  color: #626088;
}
.qm-svc-chip[data-preset="rubro_fotografia"] .qm-svc-chip-n {
  background: rgba(190, 186, 232, 0.45);
  color: #626088;
}

.qm-svc-chip[data-preset="rubro_indumentaria"] {
  background: #f8eef6;
  border-color: rgba(220, 186, 210, 0.55);
  color: #7a6272;
}
.qm-svc-chip[data-preset="rubro_indumentaria"] .qm-svc-chip-n {
  background: rgba(220, 186, 210, 0.45);
  color: #7a6272;
}

.qm-svc-chip[data-preset="rubro_nutricion"] {
  background: #f2faee;
  border-color: rgba(186, 220, 168, 0.55);
  color: #5a7448;
}
.qm-svc-chip[data-preset="rubro_nutricion"] .qm-svc-chip-n {
  background: rgba(186, 220, 168, 0.45);
  color: #5a7448;
}

.qm-svc-chip[data-preset="rubro_ortopedia"] {
  background: #eef4fa;
  border-color: rgba(168, 196, 220, 0.55);
  color: #526a7a;
}
.qm-svc-chip[data-preset="rubro_ortopedia"] .qm-svc-chip-n {
  background: rgba(168, 196, 220, 0.45);
  color: #526a7a;
}

.qm-svc-chip[data-preset="rubro_peluqueria"] {
  background: #fceef8;
  border-color: rgba(232, 186, 216, 0.55);
  color: #825a72;
}
.qm-svc-chip[data-preset="rubro_peluqueria"] .qm-svc-chip-n {
  background: rgba(232, 186, 216, 0.45);
  color: #825a72;
}

.qm-svc-chip[data-preset="rubro_refugio"] {
  background: #eefaf2;
  border-color: rgba(160, 210, 180, 0.55);
  color: #457a58;
}
.qm-svc-chip[data-preset="rubro_refugio"] .qm-svc-chip-n {
  background: rgba(160, 210, 180, 0.45);
  color: #457a58;
}

.qm-svc-chip[data-preset="rubro_rescatista"] {
  background: #fff8ec;
  border-color: rgba(240, 210, 160, 0.55);
  color: #826a42;
}
.qm-svc-chip[data-preset="rubro_rescatista"] .qm-svc-chip-n {
  background: rgba(240, 210, 160, 0.45);
  color: #826a42;
}

.qm-svc-chip[data-preset="rubro_transporte"] {
  background: #eef8fa;
  border-color: rgba(160, 210, 220, 0.55);
  color: #4a7280;
}
.qm-svc-chip[data-preset="rubro_transporte"] .qm-svc-chip-n {
  background: rgba(160, 210, 220, 0.45);
  color: #4a7280;
}

.qm-svc-chip[data-preset="rubro_guarderia"],
.qm-svc-chip[data-preset="rubro_hospedaje"] {
  background: #f5f8ee;
  border-color: rgba(204, 216, 168, 0.55);
  color: #6a7448;
}
.qm-svc-chip[data-preset="rubro_guarderia"] .qm-svc-chip-n,
.qm-svc-chip[data-preset="rubro_hospedaje"] .qm-svc-chip-n {
  background: rgba(204, 216, 168, 0.45);
  color: #6a7448;
}

.qm-svc-chip[data-preset="rubro_tienda_mascotas"] {
  background: #fff4f0;
  border-color: rgba(240, 200, 186, 0.55);
  color: #866258;
}
.qm-svc-chip[data-preset="rubro_tienda_mascotas"] .qm-svc-chip-n {
  background: rgba(240, 200, 186, 0.45);
  color: #866258;
}

.qm-svc-chip[data-preset^="rubro_"]:not([data-preset="rubro_accesorios"]):not([data-preset="rubro_adiestramiento"]):not([data-preset="rubro_cremacion"]):not([data-preset="rubro_cuidador"]):not([data-preset="rubro_fotografia"]):not([data-preset="rubro_indumentaria"]):not([data-preset="rubro_nutricion"]):not([data-preset="rubro_ortopedia"]):not([data-preset="rubro_peluqueria"]):not([data-preset="rubro_refugio"]):not([data-preset="rubro_rescatista"]):not([data-preset="rubro_transporte"]):not([data-preset="rubro_guarderia"]):not([data-preset="rubro_hospedaje"]):not([data-preset="rubro_tienda_mascotas"]) {
  background: #f4faf6;
  border-color: rgba(176, 210, 190, 0.5);
  color: #527a62;
}
.qm-svc-chip[data-preset^="rubro_"]:not([data-preset="rubro_accesorios"]):not([data-preset="rubro_adiestramiento"]):not([data-preset="rubro_cremacion"]):not([data-preset="rubro_cuidador"]):not([data-preset="rubro_fotografia"]):not([data-preset="rubro_indumentaria"]):not([data-preset="rubro_nutricion"]):not([data-preset="rubro_ortopedia"]):not([data-preset="rubro_peluqueria"]):not([data-preset="rubro_refugio"]):not([data-preset="rubro_rescatista"]):not([data-preset="rubro_transporte"]):not([data-preset="rubro_guarderia"]):not([data-preset="rubro_hospedaje"]):not([data-preset="rubro_tienda_mascotas"]) .qm-svc-chip-n {
  background: rgba(176, 210, 190, 0.4);
  color: #527a62;
}

.qm-svc-chip-icon {
  font-size: 0.95rem;
  line-height: 1;
  flex-shrink: 0;
}

.qm-svc-chip-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 0 1 auto;
  font-size: 0.72rem;
  text-align: center;
}

.qm-svc-chip-n {
  min-width: 1.1rem;
  padding: 1px 5px;
  border-radius: 999px;
  background: rgba(186, 196, 210, 0.35);
  color: #6b7280;
  font-size: 0.62rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.3;
  flex-shrink: 0;
}

.qm-orbit-empty {
  font-size: 0.72rem;
  color: #5a7568;
  padding: 8px;
  text-align: center;
}

.qm-layout {
  flex: 1 1 0;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  min-height: 0;
  overflow: hidden;
}

.qm-map-stage {
  flex: 1 1 0;
  position: relative;
  min-width: 0;
  min-height: 320px;
  overflow: visible;
  align-self: stretch;
  display: grid;
  grid-template: 1fr / 1fr;
}

.qm-map-stage > #qmMap,
.qm-map-stage > .qm-legend,
.qm-map-stage > .qm-loading,
.qm-map-stage > .qm-radial-wrap {
  grid-area: 1 / 1;
}

#qmMap {
  width: 100%;
  height: 100%;
  min-height: 0;
  z-index: 1;
}

#qmMap.leaflet-container .leaflet-bottom.leaflet-left {
  bottom: 16px;
  left: 10px;
}

#qmMap.leaflet-container .leaflet-bottom.leaflet-right {
  right: 80px;
  bottom: 8px;
  max-width: calc(100% - 96px);
}

#qmMap.leaflet-container .leaflet-control-layers {
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  font-size: 0.78rem;
}

.qm-legend {
  position: absolute;
  /* A la derecha del zoom +/−, con 5 mm de separación */
  top: 8px;
  left: calc(8px + 34px + 5mm);
  z-index: 450;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 8px;
  padding: 4px 6px;
  font-size: 0.68rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
  line-height: 1.2;
  max-width: min(220px, calc(100% - 56px - 260px));
}

#qmMap.leaflet-container .leaflet-top.leaflet-left {
  top: 8px;
  left: 8px;
}

#qmMap.leaflet-container .leaflet-control-zoom {
  border: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}

.qm-legend span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.qm-legend-hint {
  margin-top: 2px;
  font-size: 0.58rem;
  line-height: 1.15;
  color: #5a7568;
  font-weight: 600;
}

.qm-legend-hint--mobile {
  display: none;
}

.qm-mobile-guide,
.qm-mobile-chip-hint,
.qm-mobile-map-label {
  display: none;
}

.qm-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px #fff;
  display: inline-block;
}

.qm-dot--open { background: #22c55e; animation: qm-pulse 1.8s ease-in-out infinite; }
.qm-dot--maybe { background: #eab308; }
.qm-dot--closed { background: #94a3b8; }

@keyframes qm-pulse {
  0%, 100% { box-shadow: 0 0 0 2px #fff, 0 0 0 0 rgba(34, 197, 94, 0.5); }
  50% { box-shadow: 0 0 0 2px #fff, 0 0 0 8px rgba(34, 197, 94, 0); }
}

/* Panel derecho — ficha al seleccionar pin (como capas DII) */
.qm-side-panel {
  width: min(380px, 36vw);
  flex: 0 0 min(380px, 36vw);
  min-height: 0;
  max-height: 100%;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  background: #f7faf8;
  border-left: 1px solid rgba(75, 116, 98, 0.18);
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.06);
  z-index: 460;
  overflow: hidden;
}

.qm-page:has(.qm-detail.is-visible) .qm-radial-wrap {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s;
}

.qm-side-panel:has(.qm-detail.is-visible) {
  z-index: 520;
  /* Un solo bloque scrollable: cabecera + ficha, sin recortar el nombre arriba */
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.qm-side-head[hidden] {
  display: none !important;
}

.qm-side-panel:has(.qm-detail.is-visible) .qm-detail.is-visible {
  flex: 0 0 auto;
  min-height: auto;
  overflow: visible;
  border-top: none;
  box-shadow: none;
  background: #fff;
  padding-top: 14px;
}

.qm-detail.is-visible > * {
  flex-shrink: 0;
}

.qm-market-week-heading {
  margin: 0 12px 8px;
  padding: 0;
  font-size: 0.84rem;
  font-weight: 800;
  color: #2d4a3e;
  letter-spacing: 0.01em;
}

.qm-market-week-heading[hidden] {
  display: none !important;
}

.qm-market-ad-list {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.qm-market-ad-list[hidden] {
  display: none !important;
}

.qm-market-ad-map-count {
  margin: 0 12px 10px;
  padding: 0 0 4px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #357a58;
  line-height: 1.3;
  border-bottom: 1px solid rgba(75, 116, 98, 0.12);
}

.qm-market-ad-map-count.is-zero {
  color: #94a3b8;
  font-weight: 600;
}

.qm-market-ad-map-count[hidden] {
  display: none !important;
}

.qm-market-ad {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 10px 8px;
  padding: 8px 10px;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  background: linear-gradient(135deg, rgba(75, 116, 98, 0.1) 0%, rgba(194, 96, 122, 0.08) 100%);
  border: 1px solid rgba(75, 116, 98, 0.22);
  box-shadow: 0 2px 8px rgba(75, 116, 98, 0.08);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  flex-shrink: 0;
}

.qm-market-ad[hidden] {
  display: none !important;
}

.qm-market-ad:hover,
.qm-market-ad:focus-visible {
  border-color: rgba(75, 116, 98, 0.45);
  box-shadow: 0 4px 14px rgba(75, 116, 98, 0.14);
  outline: none;
}

.qm-market-ad-kicker {
  flex: 0 0 auto;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #4b7462;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  line-height: 1.1;
  max-height: 52px;
}

.qm-market-ad-cta-col {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  align-self: center;
  min-width: 4.5rem;
}

.qm-market-ad-semaforo {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 2px #fff;
  animation: qm-market-ad-pulse 2.2s ease-in-out infinite;
}

@keyframes qm-market-ad-pulse {
  0%, 100% {
    background: #22c55e;
    box-shadow: 0 0 0 2px #fff, 0 0 0 0 rgba(34, 197, 94, 0.55);
    transform: scale(1);
  }
  50% {
    background: #eab308;
    box-shadow: 0 0 0 2px #fff, 0 0 0 7px rgba(234, 179, 8, 0);
    transform: scale(1.15);
  }
}

@media (prefers-reduced-motion: reduce) {
  .qm-market-ad-semaforo {
    animation: none;
    background: #22c55e;
  }
}

.qm-market-ad-thumb {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  background: #fff;
  border: 1px solid rgba(75, 116, 98, 0.15);
}

.qm-market-ad-text {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.qm-market-ad-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: #2d4a3e;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.qm-market-ad-title.is-structured {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  overflow: visible;
  -webkit-line-clamp: unset;
  -webkit-box-orient: unset;
}

.qm-market-ad-pct {
  font-size: 1.22rem;
  font-weight: 800;
  line-height: 1.05;
  color: #b84a66;
  letter-spacing: -0.02em;
}

.qm-market-ad-pct[hidden] {
  display: none !important;
}

.qm-market-ad-offer-line {
  font-size: 0.82rem;
  font-weight: 700;
  color: #2d4a3e;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Sin % en Firestore: rubro más visible (republicá con % en título o beneficio) */
.qm-market-ad-title.is-structured.is-no-pct .qm-market-ad-offer-line {
  font-size: 1.08rem;
  font-weight: 800;
  color: #b84a66;
  line-height: 1.2;
}

.qm-market-ad-biz {
  font-size: 0.68rem;
  color: #5a7568;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.qm-market-ad-expiry {
  font-size: 0.62rem;
  font-weight: 600;
  color: #4b7462;
  line-height: 1.25;
}

.qm-market-ad-expiry[hidden] {
  display: none;
}

.qm-market-ad-cta {
  font-size: 0.68rem;
  font-weight: 700;
  color: #c2607a;
  white-space: nowrap;
  text-align: center;
  line-height: 1.2;
}

.qm-side-panel:has(.qm-detail.is-visible) .qm-market-ad,
.qm-side-panel:has(.qm-detail.is-visible) .qm-market-ad-list,
.qm-side-panel:has(.qm-detail.is-visible) .qm-market-week-heading,
.qm-side-panel:has(.qm-detail.is-visible) .qm-market-ad-map-count {
  display: none;
}

.qm-side-head {
  flex-shrink: 0;
  padding: 14px 16px 12px;
  background: #fff;
  border-bottom: 1px solid rgba(75, 116, 98, 0.1);
}

.qm-side-kicker {
  margin: 0 0 4px;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6b8578;
  font-weight: 700;
}

.qm-side-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: #1a2e26;
  line-height: 1.25;
}

.qm-side-count {
  margin: 6px 0 0;
  font-size: 0.8rem;
  font-weight: 700;
  color: #357a58;
  line-height: 1.35;
}

.qm-side-count.is-zero {
  color: #b45309;
}

.qm-side-zone {
  margin: 4px 0 0;
  font-size: 0.78rem;
  color: #4b7462;
}

.qm-side-empty {
  flex-shrink: 0;
  padding: 16px;
  font-size: 0.85rem;
  color: #4a6358;
  line-height: 1.5;
}

.qm-side-empty[hidden] { display: none; }

.qm-results-list {
  list-style: none;
  margin: 0;
  padding: 8px 10px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-bottom: 1px solid rgba(75, 116, 98, 0.08);
}

.qm-results-list[hidden] { display: none; }

.qm-results-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  border: none;
  background: #fff;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.82rem;
  color: #1a2e26;
  margin-bottom: 6px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  transition: background 0.15s, box-shadow 0.15s;
}

.qm-results-item:hover {
  background: #eef6f1;
  box-shadow: 0 2px 8px rgba(75, 116, 98, 0.12);
}

.qm-results-item.is-active {
  outline: 2px solid #4b7462;
  background: #eef6f1;
}

.qm-results-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.qm-detail {
  display: none;
  flex-direction: column;
  padding: 14px 16px 18px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  background: #fff;
}

.qm-detail.is-visible {
  display: flex;
  background: linear-gradient(165deg, #e8f5ee 0%, #f7faf8 42%, #fff 100%);
  border-top: 3px solid #4b7462;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.qm-detail-back {
  align-self: flex-end;
  text-align: right;
  border: 1px solid rgba(75, 116, 98, 0.35);
  background: #fff;
  color: #2d5a45;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  padding: 6px 12px;
  margin: 0 0 12px;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(75, 116, 98, 0.12);
  transition: background 0.15s, border-color 0.15s;
}

.qm-detail-back:hover,
.qm-detail-back:focus-visible {
  background: #eef6f1;
  border-color: #4b7462;
}

.qm-detail-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 10px;
  min-width: 0;
}

.qm-detail-head > div {
  min-width: 0;
  flex: 1 1 auto;
}

.qm-detail-avatar {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
  background: #eef6f1;
  flex-shrink: 0;
}

.qm-detail h3 {
  font-size: 1rem;
  margin: 0 0 4px;
  color: #1a2e26;
  line-height: 1.3;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.qm-detail-rubro {
  margin: 0;
  font-size: 0.75rem;
  color: #6b8578;
}

.qm-detail-status {
  margin: 0 0 10px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #15803d;
}

.qm-detail-addr {
  margin: 0 0 8px;
  font-size: 0.85rem;
  color: #4a6358;
  line-height: 1.45;
}

.qm-detail-phone {
  margin: 0 0 12px;
  font-size: 0.85rem;
  color: #1a2e26;
}

.qm-detail-directions {
  margin: 14px 0 6px;
  padding: 12px 0 0;
  border-top: 1px solid rgba(75, 116, 98, 0.1);
  text-align: center;
}

.qm-detail-directions[hidden] {
  display: none !important;
}

.qm-detail-directions-title {
  margin: 0 0 10px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6b8578;
}

.qm-detail-directions-btns {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: stretch;
  gap: 8px;
}

.qm-dir-chip {
  flex: 1 1 0;
  max-width: 108px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 6px;
  border-radius: 12px;
  border: 1px solid rgba(75, 116, 98, 0.2);
  background: #f7faf8;
  color: #1a2e26;
  font-size: 0.72rem;
  font-weight: 700;
  text-decoration: none;
  line-height: 1.15;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.qm-dir-chip:hover {
  background: #eef6f1;
  border-color: #4b7462;
  transform: translateY(-1px);
}

.qm-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
  padding-top: 8px;
}

.qm-detail-actions .qm-btn-perfil,
.qm-detail-actions .qm-btn-wa {
  flex: 1 1 calc(50% - 5px);
  min-width: 0;
  text-align: center;
  font-weight: 800;
  border-radius: 12px;
  border-width: 2px;
  border-style: solid;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease,
    box-shadow 0.2s ease;
}

.qm-detail-actions .qm-btn-perfil {
  background: var(--primary-light, #e7decd);
  border-color: var(--primary, #4b7462);
  color: var(--primary-dark, #3e5131);
}

.qm-detail-actions .qm-btn-perfil:hover {
  background: var(--primary, #4b7462);
  border-color: var(--primary-dark, #3e5131);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(75, 116, 98, 0.28);
}

.qm-detail-actions .qm-btn-wa {
  background: #25d366;
  border-color: #25d366;
  color: #fff;
}

.qm-detail-actions .qm-btn-wa:hover {
  background: #20bd5a;
  border-color: #1da851;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.45);
}

.qm-radial-wrap {
  position: relative;
  z-index: 480;
  align-self: stretch;
  justify-self: end;
  width: min(248px, 72vw);
  max-width: 100%;
  min-height: 0;
  height: 100%;
  margin-right: max(12px, env(safe-area-inset-right, 0px));
  display: flex;
  align-items: center;
  justify-content: flex-end;
  overflow: visible;
  pointer-events: none;
  touch-action: manipulation;
  box-sizing: border-box;
}

.qm-radial-wrap .qm-radial,
.qm-radial-wrap .qm-orbit {
  pointer-events: auto;
}


.qm-radial-wrap .qm-orbit-tip {
  pointer-events: none;
}

.qm-radial {
  position: relative;
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qm-fab {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #5a8f76, #4b7462);
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(75, 116, 98, 0.45);
  transition: transform 0.22s ease, box-shadow 0.2s ease;
  z-index: 12;
  position: relative;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.qm-fab:active { transform: scale(0.94); }

.qm-radial[data-open="true"] .qm-fab,
.qm-radial-wrap:hover .qm-fab {
  transform: rotate(45deg);
}

@media (hover: hover) and (pointer: fine) {
  .qm-radial-wrap:hover .qm-fab {
    transform: rotate(45deg) scale(1.06);
    box-shadow: 0 8px 28px rgba(75, 116, 98, 0.5);
  }
}

.qm-orbit {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 248px;
  height: 248px;
  margin: -124px 0 0 -124px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.16s ease, visibility 0.16s;
  visibility: hidden;
}

.qm-orbit-wheel {
  position: absolute;
  inset: 0;
}

.qm-timon-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 248px;
  height: 248px;
  margin: -124px 0 0 -124px;
  border-radius: 50%;
  border: 2px solid rgba(75, 116, 98, 0.22);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  pointer-events: none;
}

.qm-timon-notch {
  position: absolute;
  left: 50%;
  top: 6px;
  width: 0;
  height: 0;
  margin-left: -8px;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 12px solid #2d8a5e;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
  pointer-events: none;
  z-index: 5;
}

.qm-radial[data-open="true"] .qm-orbit,
.qm-radial-wrap:hover .qm-orbit {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.qm-radial[data-open="true"] .qm-fab,
.qm-radial-wrap:hover .qm-fab {
  transform: rotate(45deg);
}

@media (hover: none), (pointer: coarse) {
  .qm-radial-wrap:hover .qm-orbit {
    opacity: 0;
    visibility: hidden;
  }

  .qm-radial-wrap:hover .qm-fab {
    transform: none;
  }

  .qm-radial[data-open="true"] .qm-orbit {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
  }

  .qm-radial[data-open="true"] .qm-fab {
    transform: rotate(45deg);
  }
}

.qm-orbit-btn {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  margin: -27px 0 0 -27px;
  border-radius: 50%;
  border: 2px solid rgba(75, 116, 98, 0.22);
  background: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  font-size: 1.4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform: rotate(var(--angle)) translateY(calc(-1 * var(--radius))) rotate(calc(-1 * var(--angle))) scale(1);
  transition: transform 0.14s ease, box-shadow 0.12s ease, border-color 0.12s;
  animation: qm-orbit-in 0.28s ease backwards;
  animation-delay: calc(var(--i) * 22ms);
  z-index: 1;
}

.qm-orbit-btn--vet24,
.qm-orbit-btn--hospital24,
.qm-orbit-btn--urgencias {
  border-color: rgba(198, 40, 40, 0.35);
}

.qm-orbit-btn.is-hover {
  z-index: 25;
  border-color: #2d8a5e;
  box-shadow: 0 6px 18px rgba(45, 138, 94, 0.32);
  transform: rotate(var(--angle)) translateY(calc(-1 * var(--radius))) rotate(calc(-1 * var(--angle))) scale(1.1);
}

.qm-orbit-btn:hover,
.qm-orbit-btn:focus-visible {
  z-index: 20;
  box-shadow: 0 8px 26px rgba(75, 116, 98, 0.35);
  border-color: rgba(75, 116, 98, 0.45);
}

.qm-orbit-count {
  position: absolute;
  right: -2px;
  top: -2px;
  min-width: 1.1rem;
  padding: 1px 5px;
  border-radius: 999px;
  background: #2d8a5e;
  color: #fff;
  font-size: 0.58rem;
  font-weight: 800;
  line-height: 1.2;
  border: 2px solid #fff;
}

.qm-orbit-btn.is-active {
  border-color: #4b7462;
  background: #eef6f1;
  transform: rotate(var(--angle)) translateY(calc(-1 * var(--radius))) rotate(calc(-1 * var(--angle))) scale(1.06);
}

.qm-orbit-btn--dense {
  width: 46px;
  height: 46px;
  margin: -23px 0 0 -23px;
  font-size: 1.15rem;
}

.qm-orbit--dense .qm-timon-ring {
  width: 228px;
  height: 228px;
  margin: -114px 0 0 -114px;
}

.qm-orbit .qm-orbit-tip {
  position: absolute;
  left: 50%;
  top: 0;
  z-index: 30;
  max-width: min(220px, 70vw);
  padding: 7px 12px;
  border-radius: 10px;
  background: rgba(26, 46, 38, 0.94);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  pointer-events: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  transform: translate(-50%, calc(-100% - 8px));
  opacity: 0;
  transition: opacity 0.08s ease;
  white-space: nowrap;
}

.qm-orbit-tip.is-visible {
  opacity: 1;
}

.qm-orbit-tip[hidden] {
  display: none !important;
}

@keyframes qm-orbit-in {
  from { opacity: 0; transform: rotate(var(--angle)) translateY(-40px) rotate(calc(-1 * var(--angle))); }
}

.qm-orbit-label {
  display: none !important;
}

.qm-loading {
  position: absolute;
  inset: 0;
  z-index: 440;
  background: rgba(232, 238, 235, 0.55);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.qm-loading[hidden] { display: none; }

.qm-loading-msg {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: #1a5c42;
  letter-spacing: 0.02em;
  text-align: center;
  max-width: 16rem;
  line-height: 1.35;
}

/* Radar LoChloe — barrido rotativo verde */
.qm-radar {
  position: relative;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(238, 246, 241, 0.95) 0%,
    rgba(75, 116, 98, 0.22) 42%,
    rgba(26, 92, 66, 0.45) 100%
  );
  border: 2px solid rgba(75, 116, 98, 0.55);
  box-shadow:
    0 0 0 4px rgba(75, 116, 98, 0.08),
    0 8px 28px rgba(45, 138, 94, 0.35);
  overflow: hidden;
}

.qm-radar-rings {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle, transparent 32%, rgba(75, 116, 98, 0.2) 33%, transparent 34%),
    radial-gradient(circle, transparent 52%, rgba(75, 116, 98, 0.16) 53%, transparent 54%),
    radial-gradient(circle, transparent 72%, rgba(75, 116, 98, 0.12) 73%, transparent 74%);
  pointer-events: none;
}

.qm-radar-sweep {
  position: absolute;
  inset: -50%;
  width: 200%;
  height: 200%;
  left: -50%;
  top: -50%;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    transparent 300deg,
    rgba(45, 138, 94, 0.08) 312deg,
    rgba(45, 138, 94, 0.55) 338deg,
    rgba(120, 200, 160, 0.95) 360deg
  );
  animation: qm-radar-sweep 2.4s linear infinite;
  transform-origin: 50% 50%;
}

.qm-radar-core {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: #2d8a5e;
  box-shadow: 0 0 12px rgba(45, 138, 94, 0.9);
  animation: qm-radar-pulse 1.6s ease-in-out infinite;
}

@keyframes qm-radar-sweep {
  to { transform: rotate(360deg); }
}

@keyframes qm-radar-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.15); opacity: 0.85; }
}

@media (prefers-reduced-motion: reduce) {
  .qm-radar-sweep { animation: none; opacity: 0.35; }
  .qm-radar-core { animation: none; }
}

.qm-marker {
  background: transparent !important;
  border: none !important;
}

.qm-region-hub-marker {
  background: transparent !important;
  border: none !important;
}

.qm-region-hub-pin {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 4px solid #fff;
  background: #22c55e;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 18px rgba(45, 138, 94, 0.45);
  cursor: pointer;
  animation: qm-hub-pulse 2s ease-in-out infinite;
}

.qm-region-hub-n {
  font-size: 0.95rem;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  line-height: 1;
}

.qm-region-hub-tip {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(26, 46, 38, 0.92);
  color: #fff;
  border: none;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.qm-region-hub-tip strong {
  font-weight: 800;
  color: #b8e6c8;
}

@keyframes qm-hub-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

.qm-marker-pin {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  touch-action: manipulation;
}

.qm-marker-pin--open {
  background: #22c55e;
  animation: qm-pulse 1.8s ease-in-out infinite;
}

.qm-marker-pin--maybe { background: #eab308; }
.qm-marker-pin--closed { background: #94a3b8; }

.qm-marker-pin.is-selected {
  transform: scale(1.4);
  border-width: 4px;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.35), 0 4px 14px rgba(0, 0, 0, 0.25);
}

/* Tooltip nombre al hover sobre pin verde (Leaflet) */
.leaflet-tooltip.qm-marker-tip {
  background: rgba(26, 46, 38, 0.94);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.2;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
  white-space: nowrap;
  max-width: min(280px, 80vw);
  text-overflow: ellipsis;
  overflow: hidden;
  margin-top: -4px;
  pointer-events: none;
}

.leaflet-tooltip.qm-marker-tip::before {
  border-top-color: rgba(26, 46, 38, 0.94);
}


@media (max-width: 900px) {
  .qm-mobile-guide {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px 8px;
    padding: 8px 12px;
    margin: 0;
    background: linear-gradient(180deg, #faf8fc 0%, #fff 100%);
    border-bottom: 1px solid rgba(186, 176, 196, 0.35);
    font-size: 0.68rem;
    font-weight: 700;
    color: #64748b;
    flex-shrink: 0;
  }

  .qm-mobile-guide-step {
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(186, 196, 210, 0.5);
    white-space: nowrap;
  }

  .qm-mobile-guide-step.is-current {
    background: #eef8f2;
    border-color: rgba(75, 116, 98, 0.45);
    color: #3d6b58;
    box-shadow: 0 0 0 2px rgba(75, 116, 98, 0.12);
  }

  .qm-mobile-chip-hint {
    display: block;
    margin: 0 0 6px;
    padding: 0 4px;
    font-size: 0.65rem;
    line-height: 1.35;
    font-weight: 600;
    color: #7a8494;
    text-align: center;
  }

  .qm-mobile-map-label {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 460;
    margin: 0;
    padding: 6px 10px;
    font-size: 0.68rem;
    font-weight: 800;
    color: #3d5248;
    text-align: center;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(75, 116, 98, 0.12);
    pointer-events: none;
  }

  .qm-zone-field > span::first-letter {
    font-weight: 800;
  }

  .qm-zone-summary.is-mobile-stack .qm-sum-sep {
    display: none;
  }

  .qm-zone-summary.is-mobile-stack .qm-sum-break {
    display: block;
    height: 0;
  }

  .qm-zone-summary.is-mobile-stack .qm-sum-loc,
  .qm-zone-summary.is-mobile-stack .qm-sum-youare,
  .qm-zone-summary.is-mobile-stack .qm-sum-guardia24,
  .qm-zone-summary.is-mobile-stack .qm-sum-24hint,
  .qm-zone-summary.is-mobile-stack .qm-sum-empty {
    display: block;
    margin-top: 3px;
  }

  .qm-zone-summary.is-mobile-stack .qm-sum-loc {
    margin-top: 0;
  }

  .qm-marker-pin {
    width: 30px;
    height: 30px;
  }

  .qm-map-stage .leaflet-marker-icon {
    touch-action: manipulation;
  }

  .qm-topbar {
    padding: 10px 12px;
    padding-top: max(10px, env(safe-area-inset-top, 0px));
  }

  .qm-topbar h1 {
    font-size: 0.95rem;
  }

  .qm-zone-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 8px 12px 10px;
  }

  .qm-zone-field,
  .qm-zone-field--barrio {
    min-width: 0;
    max-width: none;
    width: 100%;
  }

  .qm-zone-bar .btn {
    width: 100%;
    justify-content: center;
  }

  .qm-zone-meta {
    padding-left: 10px;
    padding-right: 10px;
  }

  .qm-zone-summary {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    font-size: 0.68rem;
  }

  .qm-zone-services-row {
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }

  .qm-zone-services-block {
    flex: 1 1 100%;
    min-width: 0;
    order: 1;
  }

  .qm-zone-services-row .qm-mode-24,
  .qm-zone-services-row .qm-mode-all {
    order: 2;
    margin-left: 0;
    flex: 1 1 calc(50% - 4px);
    min-width: 0;
    text-align: center;
    justify-content: center;
  }

  .qm-zone-services-title {
    font-size: 0.78rem;
    padding: 0 4px 2px;
    line-height: 1.3;
  }

  .qm-zone-services {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    justify-items: stretch;
  }

  .qm-svc-row {
    display: contents;
  }

  .qm-page button.qm-svc-chip,
  .qm-svc-chip {
    flex: 1 1 auto;
    width: 100%;
    max-width: none;
    min-height: 36px;
    padding: 6px 8px;
  }

  .qm-svc-chip-text {
    white-space: normal;
    text-overflow: unset;
    line-height: 1.15;
    font-size: 0.7rem;
  }

  .qm-mode-24-legend.is-care-hint {
    font-size: 0.68rem;
    line-height: 1.4;
    padding: 6px 8px;
    margin: 6px 0 0;
    border-radius: 10px;
    background: #f8f4fa;
    border: 1px solid rgba(186, 176, 196, 0.4);
    color: #5a6278;
    text-align: left;
  }

  .qm-layout {
    display: contents;
  }

  .qm-zone-meta {
    padding-bottom: 0;
  }

  .qm-zone-meta::after {
    content: '';
    display: block;
    height: 8px;
  }

  .qm-side-panel {
    order: 6;
    width: calc(100% - 24px);
    margin: 0 12px 10px;
    flex: 0 0 auto;
    min-height: 0;
    max-height: min(44vh, 420px);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    border-radius: 14px;
    border: 1px solid rgba(75, 116, 98, 0.2);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
    z-index: 8;
  }

  .qm-map-stage {
    order: 5;
    flex: 0 0 42vh;
    height: 42vh;
    min-height: 280px;
    max-height: 400px;
    overflow: visible;
    z-index: 6;
  }

  #qmMap {
    width: 100%;
    height: 100%;
    min-height: 0;
    max-height: none;
    padding-top: 34px;
    box-sizing: border-box;
  }


  .qm-legend {
    display: flex;
    flex-direction: column;
    gap: 2px;
    top: auto;
    left: 8px;
    right: 8px;
    bottom: max(52px, calc(env(safe-area-inset-bottom, 0px) + 48px));
    max-width: none;
    font-size: 0.62rem;
    padding: 6px 8px;
    pointer-events: none;
  }

  .qm-legend-hint--desktop {
    display: none !important;
  }

  .qm-legend-hint--mobile {
    display: block !important;
    font-size: 0.6rem;
    margin-top: 4px;
  }

  .qm-side-kicker {
    font-size: 0.68rem;
    letter-spacing: 0.02em;
  }

  .qm-side-head {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f7faf8;
    border-bottom: 1px solid rgba(75, 116, 98, 0.1);
  }

  .qm-radial-wrap {
    width: var(--timon-box, 220px);
    height: var(--timon-box, 220px);
    max-width: min(var(--timon-box, 220px), 88vw);
    max-height: min(var(--timon-box, 220px), 88vw);
    margin-right: max(4px, env(safe-area-inset-right, 0px));
    align-items: center;
    justify-content: center;
    align-self: center;
    justify-self: end;
    padding: 0;
    overflow: visible;
    pointer-events: none;
  }

  .qm-radial {
    position: relative;
    width: 100%;
    height: 100%;
  }

  .qm-radial-wrap .qm-fab {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
  }

  .qm-radial[data-open="true"] .qm-fab,
  .qm-radial-wrap:hover .qm-fab {
    transform: translate(-50%, -50%) rotate(45deg);
  }

  @media (hover: hover) and (pointer: fine) {
    .qm-radial-wrap:hover .qm-fab {
      transform: translate(-50%, -50%) rotate(45deg) scale(1.06);
    }
  }

  .qm-orbit {
    width: var(--timon-box, 220px);
    height: var(--timon-box, 220px);
    left: 50%;
    top: 50%;
    margin-left: calc(var(--timon-box, 220px) * -0.5);
    margin-top: calc(var(--timon-box, 220px) * -0.5);
  }

  .qm-orbit .qm-orbit-tip {
    display: none !important;
  }

  .qm-radial[data-open="true"] .qm-orbit-label,
  .qm-orbit-btn.is-touch-preview .qm-orbit-label {
    display: block !important;
    position: absolute;
    left: 50%;
    bottom: -17px;
    transform: translateX(-50%);
    max-width: 72px;
    padding: 2px 4px;
    border-radius: 6px;
    background: rgba(26, 46, 38, 0.92);
    color: #fff;
    font-size: 0.52rem;
    font-weight: 700;
    line-height: 1.15;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
    z-index: 30;
  }

  .leaflet-tooltip.qm-marker-tip--pinned {
    font-size: 0.82rem;
    font-weight: 800;
    padding: 8px 12px;
  }

  #qmMap.leaflet-container {
    touch-action: pan-y;
  }

  .qm-orbit-btn.is-touch-preview {
    z-index: 26;
    border-color: #2d8a5e;
    box-shadow: 0 6px 18px rgba(45, 138, 94, 0.35);
  }

  #qmMap.leaflet-container .leaflet-bottom.leaflet-right {
    right: 72px;
    bottom: max(6px, env(safe-area-inset-bottom, 0px));
  }

  #qmMap.leaflet-container .leaflet-bottom.leaflet-left {
    bottom: max(6px, env(safe-area-inset-bottom, 0px));
  }

  .qm-fab {
    width: 56px;
    height: 56px;
    font-size: 1.35rem;
  }

  .qm-orbit-btn {
    width: 48px;
    height: 48px;
    margin: -24px 0 0 -24px;
    font-size: 1.2rem;
  }

  .qm-orbit-label {
    font-size: 0.6rem;
    max-width: 64px;
  }

  .qm-detail-directions-btns {
    flex-wrap: wrap;
  }

  .qm-dir-chip {
    flex: 1 1 calc(33% - 6px);
    max-width: none;
    min-width: 88px;
  }

  .qm-detail-actions {
    flex-wrap: nowrap;
    gap: 8px;
  }

  .qm-detail-actions .qm-btn-perfil,
  .qm-detail-actions .qm-btn-wa {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    max-width: none;
    padding: 10px 8px;
    font-size: 0.78rem;
    line-height: 1.2;
  }
}
