:root {
  --map-bg: #1a1917;
  --map-ink: #f4f0e6;
  --map-ink-soft: #b7b1a4;
  --map-accent: #e0a45a;
  --map-float: rgba(32, 30, 27, 0.94);
  --map-fill-hi: #3c362e;
  --map-shade: rgba(0, 0, 0, 0.45);
  --map-font: system-ui, sans-serif;
  --map-radius: 8px;
  --map-shadow: 0 2px 10px var(--map-shade);
  --map-line: rgba(244, 240, 230, 0.18);
  --map-focus: #f2d48a;
  --map-control: 36px;
  --map-gap: 8px;
  --map-pin: var(--map-accent);
  --map-credit: var(--map-ink-soft);
}


.map-app {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--map-bg);
  color: var(--map-ink);
  font-family: var(--map-font);
  font-size: 14px;
  line-height: 1.35;
}

.map-view {
  position: absolute;
  inset: 0;
}

.map-app .leaflet-container {
  width: 100%;
  height: 100%;
  background: var(--map-bg);
  color: var(--map-ink);
  font-family: var(--map-font);
}

.map-app .leaflet-container img.leaflet-tile {
  mix-blend-mode: normal;
}

.map-app .leaflet-tile img {
  display: block;
}

.map-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.map-app button,
.map-app input,
.map-app select {
  font-family: inherit;
  font-size: 14px;
  color: var(--map-ink);
  box-sizing: border-box;
}

.map-app button:focus-visible,
.map-app input:focus-visible,
.map-app select:focus-visible,
.map-app a:focus-visible {
  outline: 2px solid var(--map-focus);
  outline-offset: 2px;
}

.map-btn,
.map-text-btn {
  background: var(--map-float);
  border: 1px solid var(--map-line);
  border-radius: var(--map-radius);
  box-shadow: var(--map-shadow);
  cursor: pointer;
}

.map-btn:hover,
.map-text-btn:hover,
.map-suggest button:hover {
  background: var(--map-fill-hi);
}

.map-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.map-btn {
  display: grid;
  place-items: center;
  width: var(--map-control);
  height: var(--map-control);
  padding: 0;
}

.map-text-btn {
  min-height: 32px;
  padding: 4px 10px;
}

.map-zoom {
  position: absolute;
  right: var(--map-gap);
  bottom: 26px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.map-lang {
  position: absolute;
  top: var(--map-gap);
  right: var(--map-gap);
  z-index: 1000;
}

.map-lang select {
  max-width: 9.5rem;
  padding: 6px 8px;
  background: var(--map-float);
  border: 1px solid var(--map-line);
  border-radius: var(--map-radius);
  box-shadow: var(--map-shadow);
}

.map-tools {
  position: absolute;
  top: var(--map-gap);
  left: var(--map-gap);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  width: min(280px, calc(100% - 8.5rem));
}

.map-tools[hidden],
.map-panel[hidden],
.map-suggest[hidden],
.map-loading[hidden] {
  display: none !important;
}

.map-search {
  position: relative;
  margin: 0;
}

.map-search input {
  width: 100%;
  padding: 8px 10px;
  background: var(--map-float);
  border: 1px solid var(--map-line);
  border-radius: var(--map-radius);
  box-shadow: var(--map-shadow);
}

.map-search input::placeholder {
  color: var(--map-ink-soft);
}

.map-suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 1;
  margin: 0;
  padding: 4px;
  list-style: none;
  background: var(--map-float);
  border: 1px solid var(--map-line);
  border-radius: var(--map-radius);
  box-shadow: var(--map-shadow);
  max-height: 32vh;
  overflow: auto;
}

.map-suggest button {
  display: block;
  width: 100%;
  margin: 0;
  padding: 6px 8px;
  text-align: start;
  background: transparent;
  border: 0;
  border-radius: calc(var(--map-radius) - 2px);
  box-shadow: none;
  cursor: pointer;
}

.map-suggest [aria-selected="true"],
.map-suggest button:hover {
  background: var(--map-fill-hi);
}

.map-empty {
  margin: 0;
  padding: 6px 8px;
  color: var(--map-ink-soft);
}

.map-filter-toggle {
  align-self: flex-start;
}

.map-panel {
  padding: 8px;
  background: var(--map-float);
  border: 1px solid var(--map-line);
  border-radius: var(--map-radius);
  box-shadow: var(--map-shadow);
  max-height: min(48vh, 360px);
  overflow: auto;
}

.map-filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.map-filter-actions .map-text-btn {
  flex: 1 1 auto;
  box-shadow: none;
  background: var(--map-fill-hi);
}

.map-filter-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}

.map-filter-list label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 0;
  cursor: pointer;
}

.map-swatch {
  width: 10px;
  height: 10px;
  flex: none;
  border-radius: 50%;
  background: var(--pin, var(--map-pin));
  box-shadow: 0 0 0 1px var(--map-line);
}

.map-cat-ico {
  font-size: 13px;
  line-height: 1;
}

.map-cat-name {
  min-width: 0;
}

.map-count {
  margin-left: auto;
  color: var(--map-ink-soft);
  font-size: 12px;
}

.map-app input[type="checkbox"] {
  accent-color: var(--map-accent);
  width: 16px;
  height: 16px;
  flex: none;
}

.map-pin-wrap {
  background: transparent;
  border: 0;
}

.map-pin {
  display: block;
  box-sizing: border-box;
  width: 16px;
  height: 16px;
  margin: 3px;
  border-radius: 50%;
  background: var(--pin, var(--map-pin));
  border: 2px solid var(--map-ink);
  box-shadow: var(--map-shadow);
}

.map-app .leaflet-popup-content-wrapper,
.map-app .leaflet-popup-tip {
  background: var(--map-float);
  color: var(--map-ink);
  box-shadow: var(--map-shadow);
}

.map-app .leaflet-popup-content-wrapper {
  border-radius: var(--map-radius);
}

.map-app .leaflet-popup-content {
  margin: 10px 14px;
  line-height: 1.35;
  font-family: var(--map-font);
  font-size: 14px;
}

.map-app .leaflet-container a.leaflet-popup-close-button {
  color: var(--map-ink-soft);
  font-family: var(--map-font);
}

.map-app .leaflet-container a.leaflet-popup-close-button:hover,
.map-app .leaflet-container a.leaflet-popup-close-button:focus {
  color: var(--map-ink);
}

.map-pop-title {
  display: block;
  margin: 0 12px 4px 0;
  font-size: 14px;
}

.map-pop-desc {
  margin: 0;
  color: var(--map-ink-soft);
  font-size: 13px;
}

.map-loading {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 400;
  margin: 0;
  padding: 6px 10px;
  transform: translate(-50%, -50%);
  color: var(--map-ink-soft);
  background: var(--map-float);
  border-radius: var(--map-radius);
  box-shadow: var(--map-shadow);
  pointer-events: none;
}

.map-credit {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 500;
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 0.35em;
  margin: 0;
  padding: 2px 52px;
  overflow: hidden;
  white-space: nowrap;
  font-size: 10px;
  line-height: 1.4;
  color: var(--map-credit);
  background: var(--map-shade);
  pointer-events: none;
}

.map-credit a {
  color: var(--map-ink);
  pointer-events: auto;
}

.map-noscript {
  position: absolute;
  inset: 0;
  z-index: 1100;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 16px;
  text-align: center;
  background: var(--map-bg);
  color: var(--map-ink);
}

@media (pointer: coarse) {
  .map-zoom {
    display: none;
  }

  .map-credit {
    padding-inline: var(--map-gap);
  }

  .map-lang select,
  .map-search input,
  .map-text-btn {
    min-height: 40px;
  }

  .map-filter-list label {
    padding: 8px 0;
  }
}

@media (max-width: 420px) {
  .map-tools {
    width: min(280px, calc(100% - 7.5rem));
  }

  .map-credit {
    font-size: 9px;
  }

  .map-lang select {
    max-width: 6.6rem;
    padding-inline: 4px;
  }
}

@media (min-width: 1440px) {
  .map-tools {
    width: min(320px, calc(100% - 10rem));
  }
}

/* ---- Reloj dia/noche (disco y marco de David; medidas de Dis) ---- */
.map-sol {
  --w: 230px;
  position: absolute;
  right: 56px; /* Dis: 24px; 56px para no tapar los botones de zoom (36px a 8px del borde) */
  bottom: 24px;
  z-index: 600;
  width: var(--w);
  aspect-ratio: 1470 / 821;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.6));
  pointer-events: none;
  user-select: none;
}
.map-sol-win {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 86.2%;
  overflow: hidden; /* overflow, no clip-path: con clip-path Chrome dejaba huecos al girar */
  background: radial-gradient(circle calc(var(--w) * 0.381) at 50.12% 98.7%, #4a3a22 0 99%, transparent 100%);
}
.map-sol-disc {
  position: absolute;
  left: 8.81%;
  top: 15.1%;
  width: 81.41%;
  height: auto;
  aspect-ratio: 1;
  max-width: none;
  transform-origin: 50.74% 49.43%;
  will-change: transform;
}
.map-sol-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  pointer-events: none;
}
@media (max-width: 699px) {
  .map-sol { --w: 150px; right: 52px; bottom: 22px; }
}

/* ---- Localizaciones: solo el nombre (sin icono, anillo, punto ni fondo) ---- */
.map-loc-wrap { background: transparent; border: 0; width: auto !important; height: auto !important; }
.map-loc-name {
  display: block;
  transform: translate(-50%, -50%);
  font-family: "EB Garamond", Georgia, serif;
  font-size: 19px;
  line-height: 1.15;
  letter-spacing: 0.2px;
  color: #fff;
  white-space: nowrap;
  cursor: pointer;
  text-shadow: 0 0 3px rgba(0, 0, 0, 0.9), 0 1px 4px rgba(0, 0, 0, 0.95), 0 2px 10px rgba(0, 0, 0, 0.8);
}
@media (max-width: 699px) { .map-loc-name { font-size: 16px; } }

/* ---- Lugares / zonas / mares: tamano segun el zoom (variables que pone mapa.js) y sin interaccion en zonas y mares ---- */
.map-loc-place { font-size: calc(19px * var(--loc-s-place, 1)); }
.map-loc-zone { font-size: calc(19px * var(--loc-s-zone, 1)); }
.map-loc-sea { font-size: calc(19px * var(--loc-s-sea, 1)); }
.map-loc-static, .map-loc-static * { pointer-events: none; }
@media (max-width: 699px) {
  .map-loc-place { font-size: calc(16px * var(--loc-s-place, 1)); }
  .map-loc-zone { font-size: calc(16px * var(--loc-s-zone, 1)); }
  .map-loc-sea { font-size: calc(16px * var(--loc-s-sea, 1)); }
}

/* ---- Indicador de zona (abajo a la izquierda): brujula + nombre de la zona bajo el centro de la vista ---- */
.map-zone {
  position: absolute;
  left: 12px;
  bottom: 28px;
  z-index: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100% - 24px - 230px - 56px);
  margin: 0;
  color: #fff;
  font-family: "EB Garamond", Georgia, serif;
  font-size: 24px;
  line-height: 1.1;
  text-shadow: 0 0 3px rgba(0, 0, 0, 0.9), 0 1px 4px rgba(0, 0, 0, 0.95), 0 2px 10px rgba(0, 0, 0, 0.8);
  pointer-events: none;
}
.map-zone[hidden] { display: none; }
.map-zone-ico { flex: none; width: 28px; height: 28px; color: #e9e6dc; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.9)); }
.map-zone-name { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 699px) {
  .map-zone { left: 10px; bottom: 24px; gap: 8px; font-size: 17px; max-width: calc(100% - 20px - 150px - 52px - 8px); }
  .map-zone-ico { width: 22px; height: 22px; }
}

/* ---- beta page frame (not part of Build's prototype): the viewer sits between the site menu and footer ---- */
.aw-map-main { display: block; flex: 1 1 0; min-height: 0; }
.aw-map-main .map-app { height: 100%; }  /* tanda 6: el mapa ocupa toda la ventana menos el menu superior (el resto va en aw-site.css, bloque TANDA 6) */
/* v22 (David 04/10 09:45): en el movil de la pagina del mapa se oculta TODA la franja inferior (frase de redes y selector de idiomas); solo aqui, el resto de paginas la conservan.
   El pie no se quita con display:none: mapa.js mide su posicion para apilar credito, reloj y zoom (--map-b); con altura 0 pegado sobre el menu inferior, --map-b queda justo encima del menu. */
@media (max-width: 899px) { body.aw.aw-page-map > footer.aw-legend--site { height: 0; min-height: 0; padding: 0; overflow: hidden; visibility: hidden; } }
