:root {
  --bg: #10141A;
  --panel: #171D25;
  --line: #2A3340;
  --ink: #E9EEF2;
  --mute: #A9B5C2;
  --ndti: #FF6B35;
  --spot: #00F5D4;
  --warn: #FFE600;
  --tap: 52px;
  font-family: "Barlow", "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; }
#map { position: fixed; inset: 0; }

button, select, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--spot); outline-offset: 2px; }

/* Condiciones: franja superior, se lee de un vistazo con sol de frente */
.conds {
  position: fixed; top: env(safe-area-inset-top, 0px); left: 0; right: 0;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: rgba(16, 20, 26, .92); border-bottom: 1px solid var(--line);
  backdrop-filter: blur(6px);
}
.cond { padding: 8px 6px; border-right: 1px solid var(--line); min-width: 0; }
.cond:last-child { border-right: 0; }
.cond .k { display: block; font-size: 13px; color: var(--mute); }
.cond .v {
  display: block; font-family: "Barlow Condensed", sans-serif; font-weight: 600;
  font-size: clamp(16px, 4.4vw, 20px); letter-spacing: -0.01em; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.v.up { color: var(--spot); }
.v.down { color: var(--ndti); }
.v.alert { color: var(--warn); }

.banner {
  position: fixed; top: calc(env(safe-area-inset-top, 0px) + 58px); left: 12px; right: 12px;
  background: var(--warn); color: #1a1a00; padding: 8px 12px; border-radius: 6px; font-size: 14px; font-weight: 500;
}

/* Cartel de espera mientras se abre una zona */
.wait {
  position: fixed; left: 50%; top: 42%; transform: translate(-50%, -50%); z-index: 20;
  width: max-content; max-width: calc(100vw - 32px); padding: 14px 18px;
  display: flex; align-items: center; gap: 12px;
  background: var(--panel); box-shadow: 0 0 0 1px var(--line), 0 6px 24px rgba(0,0,0,.35); border-radius: 12px;
  font-size: 15px; font-weight: 500; line-height: 1.3;
}
.wait[hidden] { display: none; }
.wait i { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--spot); animation: wait-spin .9s linear infinite; }
@keyframes wait-spin { to { transform: rotate(360deg); } }

/* Elegir en el mapa: pin fijo en el centro (la punta marca el lugar) y barra abajo */
.pick { position: fixed; inset: 0; pointer-events: none; z-index: 15; }
.pick[hidden] { display: none; }
.pick-pin { position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; transform: translate(-50%, -92%);
            color: var(--spot); filter: drop-shadow(0 2px 3px rgba(0,0,0,.5)); }
.pick-bar { position: absolute; left: 12px; right: 12px; bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
            pointer-events: auto; padding: 14px 16px; border-radius: 14px;
            background: var(--panel); box-shadow: 0 0 0 1px var(--line), 0 6px 24px rgba(0,0,0,.35); }
.pick-bar p { margin: 0 0 10px; font-size: 15px; line-height: 1.35; }
.pick-bar .row { margin: 0; }
#pickGo { background: var(--spot); color: var(--bg); border: 0; font-weight: 600; }
body.picking .sheet, body.picking .catch-btn, body.picking .layers, body.picking .zone-btn,
body.picking .hs, body.picking .maplibregl-popup { display: none; }

/* Zona actual + lupa: arriba a la izquierda, frente a las capas */
.zone-btn {
  position: fixed; top: calc(env(safe-area-inset-top, 0px) + 66px); left: 10px;
  max-width: calc(100vw - 140px); min-height: 44px; padding: 0 14px 0 10px;
  display: flex; align-items: center; gap: 8px;
  border: 0; border-radius: 22px; background: var(--panel); box-shadow: 0 0 0 1px var(--line);
  font-family: "Barlow Condensed", sans-serif; font-size: 18px; font-weight: 600;
}
.zone-btn svg { width: 22px; height: 22px; flex: none; color: var(--spot); }

/* Pantalla completa: botón arriba a la derecha, frente a la zona. Prendido, solo queda el mapa. */
.full-btn {
  position: fixed; top: calc(env(safe-area-inset-top, 0px) + 66px); right: 10px; z-index: 6;
  width: 44px; height: 44px; padding: 0; border: 0; border-radius: 22px;
  display: grid; place-items: center;
  background: var(--panel); box-shadow: 0 0 0 1px var(--line);
}
.full-btn svg { width: 24px; height: 24px; color: var(--spot); }
.full-btn .ico-off { display: none; }
body.mapfull .full-btn { top: calc(env(safe-area-inset-top, 0px) + 10px); background: rgba(23, 29, 37, .7); }
body.mapfull .full-btn .ico-on { display: none; }
body.mapfull .full-btn .ico-off { display: block; }
body.mapfull .conds, body.mapfull .banner, body.mapfull .zone-btn, body.mapfull .layers,
body.mapfull .catch-btn, body.mapfull .sheet { display: none; }
body.mapfull { --sheet-peek: 0px; }
body.picking .full-btn { display: none; }
.zone-btn span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.banner:not([hidden]) ~ .zone-btn { top: calc(env(safe-area-inset-top, 0px) + 110px); }

.zone-dlg { width: min(480px, 94vw); max-height: 86vh; }
.search { display: flex; gap: 8px; margin: 10px 0; }
.search input { flex: 1; min-width: 0; }
.search button { min-height: 48px; padding: 0 16px; border-radius: 6px; border: 0; background: var(--spot); color: var(--bg); font-weight: 600; }
.zone-dlg .wide { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 8px; }
.zone-dlg .wide[hidden] { display: none; }
.zone-dlg .wide svg { width: 20px; height: 20px; color: var(--spot); }
.zone-dlg .wide.analyze { background: var(--spot); color: var(--bg); }
.zone-dlg .wide.analyze svg { color: var(--bg); }
.zlist { list-style: none; margin: 0 0 12px; padding: 0; }
.zlist li { border-top: 1px solid var(--line); }
.zlist button {
  width: 100%; min-height: 56px; padding: 8px 4px; border: 0; background: none; text-align: left;
  display: grid; gap: 2px; color: var(--ink);
}
.zlist button.on .zn { color: var(--spot); }
.zlist .zn { font-weight: 600; font-size: 17px; }
.zlist .zl { font-size: 15px; color: var(--mute); }
.ask { border: 1px solid var(--line); border-radius: 8px; padding: 12px; margin-bottom: 12px; }
.ask p { margin: 0 0 10px; font-size: 15px; line-height: 1.4; }
.ask button { min-height: var(--tap); padding: 0 18px; border-radius: 6px; border: 0; background: var(--spot); color: var(--bg); font-weight: 600; }
#offBadge { color: var(--spot); }
.pend { color: var(--warn); }

/* Panel chico al lado del botón de captura, a su altura: capas en una fila y la barra de colores.
   Transparente y del tamaño justo, para tapar poco mapa. */
.layers {
  position: fixed; right: 98px; bottom: calc(var(--sheet-peek, 230px) + 14px + 12px); z-index: 5;
  max-width: calc(100vw - 110px); padding: 4px 5px 2px; border-radius: 10px;
  display: flex; flex-direction: column; gap: 3px;
  background: rgba(16, 20, 26, .3);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .8); transition: opacity .2s;
}
body.sheet-open .layers { opacity: 0; pointer-events: none; }
.lrow { display: flex; flex-wrap: wrap; gap: 2px; }
.layers button {
  flex: 1 1 auto; min-height: 28px; padding: 0 7px; border: 0; border-radius: 14px; white-space: nowrap;
  background: rgba(23, 29, 37, .45); font-size: 12px; font-weight: 600;
}
.layers button.on { background: rgba(233, 238, 242, .8); color: var(--bg); text-shadow: none; }
/* Mostrar u ocultar las capturas: no es una capa, se prende en naranja. */
.layers button.tog[aria-pressed="true"] { background: rgba(255, 107, 53, .8); color: var(--bg); text-shadow: none; }

.legend { padding: 0 3px; font-size: 10.5px; font-weight: 600; color: var(--ink); }
.legend:empty { display: none; }
.legend .bar { height: 4px; border-radius: 2px; margin-bottom: 1px; opacity: .9; }
.legend .ends { display: flex; justify-content: space-between; }

/* Botón de captura: el objetivo más grande de la pantalla */
.catch-btn {
  position: fixed; right: 14px; bottom: calc(var(--sheet-peek, 230px) + 14px);
  width: 76px; height: 76px; border-radius: 50%; border: 0;
  background: var(--spot); color: var(--bg);
  display: grid; place-items: center; align-content: center; gap: 0;
  box-shadow: 0 0 0 4px rgba(0, 245, 212, .25);
  font-weight: 600; font-size: 14px; z-index: 5;
}
.catch-btn svg { width: 30px; height: 30px; }
body.sheet-open .catch-btn { opacity: 0; pointer-events: none; }
.catch-btn.armed { background: var(--warn); box-shadow: 0 0 0 6px rgba(255, 230, 0, .3); }

/* Panel inferior */
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 4;
  max-height: 78vh; height: var(--sheet-peek, 230px); overflow-y: auto;
  background: var(--bg); border-top: 1px solid var(--line);
  padding: 0 0 calc(env(safe-area-inset-bottom, 0px) + 16px);
  transition: height .25s ease;
}
.sheet.open { height: 78vh; }
/* Mapa entero: del panel queda solo la rayita; el botón de captura y las capas bajan con él. */
body.sheet-min { --sheet-peek: calc(env(safe-area-inset-bottom, 0px) + 30px); }
.sheet.min { overflow: hidden; }
.catch-btn, .layers { transition: bottom .25s ease, opacity .2s; }
.grip { display: block; width: 100%; height: 30px; border: 0; background: var(--bg); position: sticky; top: 0; z-index: 2; touch-action: none; }
.grip::after { content: ""; position: absolute; left: 50%; top: 10px; width: 44px; height: 5px; margin-left: -22px; border-radius: 3px; background: var(--line); }
.sheet.min .grip::after { background: var(--mute); }

.species { display: flex; gap: 6px; overflow-x: auto; padding: 0 12px 10px; scrollbar-width: none; }
.species button {
  flex: 1 0 auto; min-height: var(--tap); padding: 0 8px; border-radius: 26px;   /* los 4 mapas entran a lo ancho */
  border: 1px solid var(--line); background: var(--panel);
  font-family: "Barlow Condensed", sans-serif; font-size: 20px; font-weight: 600;
}
.species button[aria-selected="true"] { background: var(--spot); color: var(--bg); border-color: var(--spot); }

.modo { display: flex; margin: 0 12px 10px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.modo button { flex: 1; min-height: 44px; border: 0; background: var(--panel); font-weight: 600; }
.modo button[aria-checked="true"] { background: var(--ink); color: var(--bg); }
.pop .nav { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 14px; }
.pop .nav .dir { font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.pop .nav .coords { color: var(--mute); font-family: "Barlow Condensed", sans-serif; font-size: 15px; margin-bottom: 6px; }
.pop .copy-coords { min-height: 40px; width: 100%; border: 1px solid var(--spot); border-radius: 6px; background: none; color: var(--spot); font-weight: 600; }
.when { padding: 2px 14px 8px; }
.when-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.when h2 { font-size: 16px; font-weight: 500; color: var(--mute); margin: 0; }
#whenBest { font-family: "Barlow Condensed", sans-serif; font-size: 20px; font-weight: 600; color: var(--spot); }
.timeline { display: flex; align-items: flex-end; gap: 2px; height: 64px; margin-top: 6px; touch-action: pan-y; cursor: pointer; }
/* Detalle de la hora tocada: tarjeta con flechita que apunta a la barra. */
.tl-info {
  position: relative; margin-top: 8px; padding: 10px 12px 9px; border-radius: 10px;
  background: var(--panel); border: 1px solid var(--line); box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
  animation: tl-in .15s ease-out;
}
.tl-info::after {
  content: ""; position: absolute; bottom: -7px; left: clamp(12px, var(--x), calc(100% - 12px)); width: 12px; height: 12px;
  transform: translateX(-50%) rotate(45deg); background: var(--panel);
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); transition: left .12s;
}
.tl-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.tl-when { font-family: "Barlow Condensed", sans-serif; font-size: 22px; font-weight: 600; text-transform: capitalize; }
.tl-score { font-family: "Barlow Condensed", sans-serif; font-size: 30px; font-weight: 700; line-height: 1; color: var(--spot); }
.tl-score small { font-size: 15px; font-weight: 500; color: var(--mute); margin-left: 1px; }
.tl-info .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.chip { font-size: 13px; padding: 3px 9px; border-radius: 999px; background: #222A35; color: var(--ink); border: 1px solid var(--line); }
.chip.mayor { background: rgba(0, 245, 212, .14); border-color: var(--spot); color: var(--spot); }
.chip.menor { background: rgba(63, 167, 154, .16); border-color: #3FA79A; color: #7FD3C7; }
.chip.now { border-color: var(--ink); }
.chip.warn { background: rgba(255, 230, 0, .12); border-color: var(--warn); color: var(--warn); }
@keyframes tl-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.timeline .b.sel.sel { outline: 2px solid var(--warn); outline-offset: 1px; z-index: 1; }
.timeline .b { flex: 1; background: #2F4550; border-radius: 2px 2px 0 0; position: relative; min-width: 3px; }
.timeline .b.mayor { background: var(--spot); }
.timeline .b.menor { background: #3FA79A; }
.timeline .b.now { outline: 2px solid var(--ink); outline-offset: 1px; }
.timeline .b.night::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 3px; background: #394253; }
.tl-axis { display: flex; justify-content: space-between; font-size: 13px; color: var(--mute); margin-top: 9px; }

.spots { list-style: none; margin: 4px 0 0; padding: 0; }
.spots li { border-top: 1px solid var(--line); }
.spots button {
  width: 100%; min-height: 60px; border: 0; background: none; text-align: left;
  display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: 10px; padding: 6px 14px;
}
.spots .sc { font-family: "Barlow Condensed", sans-serif; font-size: 30px; font-weight: 700; color: var(--spot); line-height: 1; }
.spots .t { font-weight: 600; font-size: 16px; }
.spots .d { font-size: 15px; color: var(--mute); }
.spots .id { font-family: "Barlow Condensed", sans-serif; color: var(--mute); font-size: 16px; }
.spots .empty { padding: 16px 14px; color: var(--mute); }

.panel { border-top: 1px solid var(--line); padding: 0 14px; }
.panel summary { min-height: var(--tap); display: flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; }
.hint { color: var(--mute); font-size: 15px; margin: 0 0 10px; line-height: 1.45; max-width: 60ch; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 12px; }
.row.end { justify-content: flex-end; }
label { display: grid; gap: 4px; font-size: 15px; color: var(--mute); flex: 1 1 130px; }
label[hidden] { display: none; }  /* sin esto, el display de arriba le gana a hidden (celular al entrar con cuenta) */
input[type=file] { padding: 10px 8px; font-size: 14px; }
input, select {
  min-height: 48px; padding: 0 12px; border-radius: 6px; border: 1px solid var(--line); background: var(--panel);
  font-size: 17px; color: var(--ink);
}
.row button, .wide, dialog button {
  min-height: var(--tap); padding: 0 18px; border-radius: 6px; border: 0; background: var(--ink); color: var(--bg); font-weight: 600;
}
.wide { width: 100%; margin-bottom: 14px; }
button.ghost { background: none; color: var(--ink); border: 1px solid var(--line); }
.mini { list-style: none; padding: 0; margin: 0 0 14px; font-size: 14px; }
.mini li { display: flex; justify-content: space-between; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); align-items: center; }
.mini li button { min-height: 40px; background: none; border: 1px solid var(--line); border-radius: 6px; padding: 0 10px; color: var(--mute); }
#valBadge { font-family: "Barlow Condensed", sans-serif; color: var(--spot); font-weight: 600; }

dialog {
  border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink);
  width: min(420px, 92vw); padding: 18px;
}
dialog::backdrop { background: rgba(0, 0, 0, .6); }
dialog h2 { margin: 0 0 6px; font-family: "Barlow Condensed", sans-serif; font-size: 26px; }
dialog label { margin-bottom: 12px; }
.pwrow { display: flex; gap: 8px; }
.pwrow input { flex: 1; min-width: 0; }
.pwrow button { flex: none; width: auto; padding: 0 14px; margin: 0; }

/* Foto de la captura */
.photo-btn { display: flex; align-items: center; justify-content: center; gap: 8px; }
.photo-btn svg { width: 22px; height: 22px; color: var(--spot); }
label.check { display: flex; gap: 10px; align-items: flex-start; color: var(--ink); line-height: 1.35; }
label.check input { width: 22px; height: 22px; min-height: 0; flex: none; margin: 0; accent-color: var(--spot); }
dialog .row label { flex: 1 1 100px; margin-bottom: 0; }
.photo-prev { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.photo-prev[hidden] { display: none; }
.photo-prev img { width: 96px; height: 96px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.pop-photo { display: block; width: 200px; max-width: 100%; margin-top: 8px; border-radius: 6px; cursor: zoom-in; }
.ct.foto { box-shadow: 0 0 0 2px var(--ink); }
.mini li .thumb { width: 44px; height: 44px; flex: none; object-fit: cover; border-radius: 6px; cursor: zoom-in; }
.mini li > span { flex: 1; }
.mini li button.fix { color: var(--spot); border-color: var(--spot); }
.photo-dlg { width: min(720px, 96vw); padding: 10px; }
.photo-dlg img { display: block; width: 100%; max-height: 76vh; object-fit: contain; border-radius: 6px; margin-bottom: 10px; }
.photo-dlg .row { margin-bottom: 0; }

/* Entrar, crear cuenta y pagar (solo con el cobro encendido) */
.auth-dlg::backdrop { background: rgba(8, 11, 15, .88); }
.auth-dlg .modo { margin: 12px 0 14px; }
.auth-dlg .modo button { border-radius: 0; background: var(--panel); color: var(--ink); }
.auth-dlg .modo button[aria-selected="true"] { background: var(--ink); color: var(--bg); }
.auth-dlg .go { background: var(--spot); color: var(--bg); }
.auth-dlg .wide:last-child { margin-bottom: 0; }
.err { color: #FF6B35; font-weight: 600; min-height: 1.3em; margin: 0 0 10px; font-size: 15px; }
/* Salida suelta y tres planes en tarjetas: una debajo de otra en el celular, en fila si entra. */
.plans { list-style: none; margin: 16px 0 12px; padding: 0; display: grid; gap: 18px; }
.plans b { font-family: "Barlow Condensed", sans-serif; }
.plans li { position: relative; display: block; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.plans li.top { border: 2px solid var(--spot); }
.plans .tag { position: absolute; top: -12px; right: 12px; padding: 3px 10px; border-radius: 6px; background: var(--spot); color: var(--bg); font-size: 13px; font-weight: 700; text-transform: uppercase; }
.plans h3 { margin: 0 0 6px; font-size: 20px; }
.plans p { margin: 4px 0; }
.plans .pm b { font-size: 32px; color: var(--ink); }
.plans .pm small { margin-left: 4px; color: var(--mute); font-size: 15px; }
.plans .tot { color: var(--ink); }
.plans .save { color: var(--spot); font-weight: 700; }
.plans .plus { padding: 8px 10px; border-radius: 8px; background: rgba(0, 245, 212, .1); font-size: 14px; color: var(--mute); }
.plans .plus b { font-family: inherit; font-size: 15px; color: var(--spot); text-transform: uppercase; }
.plans .wide { margin: 10px 0 0; }
#payDlg { width: min(760px, 94vw); }
@media (min-width: 720px) { .plans { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { #payDlg { width: min(1000px, 94vw); } .plans { grid-template-columns: repeat(4, 1fr); } }
.paytext { margin: 0 0 14px; line-height: 1.45; white-space: pre-line; }
.paytext:empty { display: none; }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--sheet-peek, 230px) + 24px); transform: translate(-50%, 20px);
  background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 8px; font-weight: 500;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 10; max-width: 90vw;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
/* Aviso con un botón (por ejemplo "Corregir" después de guardar una captura): ese sí se puede tocar. */
.toast.act.show { pointer-events: auto; }
.toast button { margin-left: 10px; min-height: 36px; padding: 0 12px; border: 0; border-radius: 6px; background: var(--spot); color: var(--bg); font-weight: 600; }

/* Marcadores */
/* Lugar recomendado: punto chico y firme en el centro, verde que se esfuma hacia afuera; el número abajo. */
.hs {
  width: 44px; height: 44px; border-radius: 50%; cursor: pointer;  /* sin position: el mapa lo ubica con absolute */
  background: radial-gradient(circle, rgba(0, 245, 212, .6) 0, rgba(0, 245, 212, .3) 30%, rgba(0, 245, 212, .1) 55%, transparent 70%);
}
.hs::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; transform: translate(-50%, -50%);
  border-radius: 50%; background: var(--spot); border: 2px solid var(--bg);
}
.hs b {
  position: absolute; left: 50%; top: calc(50% + 9px); transform: translateX(-50%);
  font-family: "Barlow Condensed", sans-serif; font-weight: 700; font-size: 13px; line-height: 1; color: #fff;
  text-shadow: 0 0 3px #000, 0 0 2px #000;
}
.hs.top { width: 60px; height: 60px; }
.hs.top::before { width: 14px; height: 14px; }
.hs.top b { top: calc(50% + 11px); font-size: 15px; }
.ct { width: 16px; height: 16px; border-radius: 50%; background: var(--ndti); border: 2px solid var(--bg); }
/* Dónde está el pescador: azul (ningún otro marcador lo es) y con un halo que late para encontrarlo de un vistazo. */
.me { width: 20px; height: 20px; border-radius: 50%; background: #2F8BFF; border: 3px solid #fff; z-index: 5; pointer-events: none; }
.me::after {
  content: ""; position: absolute; inset: -3px; border-radius: 50%; background: #2F8BFF; z-index: -1;
  animation: me-late 2s ease-out infinite;
}
/* Punta pegada al punto azul que mira al hotspot tocado (gira con el rumbo; si se pasa, mira para atrás). */
.me-tip { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transition: transform .4s; }
.me-tip::before {
  content: ""; position: absolute; left: -10px; top: -36px;
  border-left: 10px solid transparent; border-right: 10px solid transparent; border-bottom: 20px solid #2F8BFF;
  filter: drop-shadow(0 0 1.5px #fff) drop-shadow(0 0 1.5px #fff);
}
/* Cono de hacia dónde va (como Google Maps); verde cuando va hacia el hotspot tocado. */
.me-cone {
  position: absolute; left: 50%; top: 50%; width: 130px; height: 130px; z-index: -2; color: #1A73E8;
  transform: translate(-50%, -50%); transition: transform .25s linear;
}
.me-cone svg { display: block; width: 100%; height: 100%; }
.me-cone.ok { color: #34D17A; }
.me-nav {
  position: absolute; left: 50%; top: 30px; transform: translateX(-50%); white-space: nowrap;
  padding: 3px 9px; border-radius: 12px; background: rgba(16, 20, 26, .9); border: 1px solid var(--line);
  color: var(--ink); font-size: 14px; font-weight: 600;
}
@keyframes me-late { from { transform: scale(1); opacity: .6; } to { transform: scale(3.2); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .me::after { animation: none; transform: scale(2); opacity: .3; } }
.maplibregl-popup-content { background: var(--bg); color: var(--ink); border: 1px solid var(--line); font-family: "Barlow", sans-serif; padding: 12px 14px; }
.maplibregl-popup-tip { border-top-color: var(--line) !important; border-bottom-color: var(--line) !important; }
.maplibregl-popup-close-button { color: var(--mute); font-size: 22px; width: 36px; height: 36px; }
.pop h3 { margin: 0 0 4px; font-family: "Barlow Condensed", sans-serif; font-size: 22px; }
.pop .big { font-family: "Barlow Condensed", sans-serif; font-size: 34px; font-weight: 700; color: var(--spot); }
.pop table { border-collapse: collapse; font-size: 14px; margin-top: 6px; }
.pop td { padding: 2px 8px 2px 0; color: var(--mute); }
.pop td:last-child { color: var(--ink); text-align: right; }
.pop a { color: var(--spot); display: inline-block; margin-top: 8px; min-height: 32px; }

@media (min-width: 900px) {
  .sheet { left: auto; width: 400px; top: 64px; height: auto !important; max-height: none; border-left: 1px solid var(--line); border-top: 0; }
  .grip { display: none; }
  .sheet { padding-top: 12px; }
  .banner { right: 412px; }
  .catch-btn { right: 424px; bottom: 24px; }
  .layers { right: 494px; bottom: 36px; }
  body.sheet-open .layers { opacity: 1; pointer-events: auto; }
  .zone-btn { max-width: 340px; }
  body.sheet-open .catch-btn { opacity: 1; pointer-events: auto; }
  .toast { bottom: 110px; left: calc(50% - 200px); }
  :root, body.sheet-min { --sheet-peek: 0px; --tap: 40px; }
  .sheet.min { overflow-y: auto; }
  /* En PC se usa con mouse: controles más compactos que en el celular */
  .species { flex-wrap: wrap; overflow-x: visible; }
  .species button { font-size: 16px; padding: 0 14px; border-radius: 20px; }
  .catch-btn { width: 60px; height: 60px; font-size: 11px; }
  .catch-btn svg { width: 24px; height: 24px; }
  .layers button { min-height: 30px; font-size: 13px; }
  .spots button { min-height: 48px; grid-template-columns: 44px 1fr auto; padding: 4px 14px; }
  .spots .sc { font-size: 24px; }
  .spots .t { font-size: 15px; }
  input, select { min-height: 38px; font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* En pantallas angostas la luna ya se ve en la franja de "Mejor momento" */
@media (max-width: 480px) {
  .conds { grid-template-columns: repeat(4, 1fr); }
  .cond:last-child { display: none; }
  .cond:nth-child(4) { border-right: 0; }
}
