/* Levante y Poniente · SEA SPORTS — estilo Mediterráneo Premium */
:root {
  color-scheme: light;
  --navy: #0B3558;
  --navy-2: #0E4664;
  --teal: #00798C;
  --teal-2: #0A8FA0;
  --aqua-soft: #DFF0EC;
  --arena: #F4ECD8;
  --cream: #FDFBF4;
  --coral: #FF8C42;
  --coral-2: #FFB77E;
  --ink: #16324A;
  --muted: #6D8578;
  --line: #E9DFC6;
  --radius: 16px;
  --font-head: "Poppins", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  font-family: var(--font-body);
  background: var(--arena);
  color: var(--ink);
}

body { display: flex; flex-direction: column; }

/* ---------------------------------------------------------------- header */
.topbar {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding: 14px 22px;
  background: linear-gradient(120deg, var(--navy) 0%, var(--teal) 100%);
  box-shadow: 0 6px 20px rgba(11, 53, 88, .18);
}

.brand { display: flex; align-items: center; gap: 12px; }

.logo { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; object-position: center; filter: drop-shadow(0 3px 6px rgba(0,0,0,.25)); }

.wordmark { display: flex; flex-direction: column; line-height: 1.05; }
.wm1 {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: #fff;
}
.wm2 {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 5px;
  color: var(--coral-2);
  text-transform: uppercase;
}

.controls {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.controls label { font-size: 12.5px; font-weight: 700; color: var(--coral-2); text-transform: uppercase; letter-spacing: .5px; }
.controls select, .controls button {
  border-radius: 999px;
  padding: 8px 30px 8px 14px;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  border: 1px solid rgba(255, 255, 255, .55);
}
/* Desplegables de filtros: mismo lenguaje visual que los botones de la cabecera */
.controls select {
  appearance: none;
  -webkit-appearance: none;
  color: #fff;
  background-color: var(--teal);
  background-image: linear-gradient(120deg, var(--teal), var(--teal-2));
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'><path fill='none' stroke='%23FFFFFF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M3 5.5l4 4 4-4'/></svg>"), linear-gradient(120deg, #00798C, #0AA6B8);
  background-repeat: no-repeat, no-repeat;
  background-position: right 10px center, center;
  background-size: 13px, 100% 100%;
  cursor: pointer;
  border-color: transparent;
  text-shadow: 0 1px 1px rgba(0, 0, 0, .12);
  box-shadow: 0 3px 10px rgba(4, 18, 32, .22);
  transition: box-shadow .15s ease, filter .15s ease, transform .15s ease;
}
.controls select:hover { filter: brightness(1.08); box-shadow: 0 5px 16px rgba(4, 18, 32, .3); }
.controls select:focus { outline: none; box-shadow: 0 0 0 3px rgba(10, 166, 184, .45); }
/* Opciones del desplegable: texto oscuro sobre blanco para que se lean al abrir */
.controls select option, .controls select optgroup { color: #16324A; background: #fff; font-weight: 600; }
.controls select option:checked { background: linear-gradient(0deg, var(--aqua-soft), var(--aqua-soft)); color: var(--navy); }
.controls select option { font-weight: 600; }
.controls button { cursor: pointer; font-size: 16px; padding: 5px 12px; background: linear-gradient(120deg, var(--teal), var(--teal-2)); border: none; color: #fff; box-shadow: 0 3px 10px rgba(4, 18, 32, .18); }
.controls button:hover { filter: brightness(1.07); box-shadow: 0 5px 16px rgba(4, 18, 32, .26); }
.controls button:focus { outline: 2px solid var(--coral); outline-offset: 2px; }

/* ---------------------------------------------------------------- wave divider */
.wave-divider { line-height: 0; margin-top: -1px; }
.wave-divider svg { width: 100%; height: 26px; display: block; }

/* ---------------------------------------------------------------- layout */
main { display: flex; flex: 1; min-height: 0; }

#panel {
  width: 420px;
  max-width: 46vw;
  overflow-y: auto;
  background: linear-gradient(180deg, var(--cream) 0%, #fff 100%);
  color: var(--ink);
  padding: 14px 14px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
#map { flex: 1; min-height: 400px; }

/* ---------------------------------------------------------------- search */
.search-wrap { position: relative; }
.search-icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); font-size: 14px; opacity: .55; }
.search-wrap input {
  width: 100%;
  padding: 12px 12px 12px 38px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  font-family: inherit;
  box-shadow: 0 6px 18px rgba(11, 53, 88, .08);
  backdrop-filter: blur(4px);
}
.search-wrap input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(0,121,140,.15); }

/* ---------------------------------------------------------------- browse by locality */
.browse { border-top: 1px solid var(--line); padding-top: 10px; }
.browse-head { font-family: var(--font-head); font-weight: 700; font-size: 13px; color: var(--teal); letter-spacing: .4px; margin-bottom: 6px; }
.browse details { margin: 3px 0; }
.browse summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
  color: var(--navy);
  padding: 7px 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  list-style: none;
  transition: border-color .12s ease, background .12s ease;
}
.browse summary::-webkit-details-marker { display: none; }
.browse summary::before { content: "▸"; display: inline-block; margin-right: 6px; transition: transform .15s ease; color: var(--coral); }
.browse details[open] summary::before { transform: rotate(90deg); }
.browse summary:hover { border-color: var(--teal); }
.browse ul { list-style: none; margin: 4px 0 8px 4px; padding: 0 0 0 12px; border-left: 2px solid var(--aqua-soft); }
.browse li { padding: 5px 8px; font-size: 12.5px; cursor: pointer; border-radius: 8px; color: #3A576B; }
.browse li:hover { background: var(--aqua-soft); color: var(--navy); }
.browse li .bt { opacity: .5; font-size: 10.5px; margin-left: 5px; text-transform: uppercase; letter-spacing: .3px; }

/* ---------------------------------------------------------------- status / list */
.status { font-size: 12.5px; font-weight: 700; color: var(--navy); padding: 2px 6px; }
.updated-at { font-size: 11px; color: var(--muted); padding: 0 6px 4px; }

/* Aviso de versión nueva: flotando arriba, visible también con la app instalada
   (a pantalla completa no hay barra del navegador para recargar a mano). */
.update-bar {
  position: fixed; z-index: 2000; top: 10px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px; max-width: calc(100vw - 20px);
  padding: 7px 9px 7px 14px; border-radius: 999px;
  background: linear-gradient(120deg, var(--navy), #14507f); color: #fff;
  box-shadow: 0 10px 26px rgba(11, 53, 88, .35); font-size: 13px; font-weight: 600;
  animation: updateIn .35s ease;
}
.update-bar[hidden] { display: none !important; }
.update-txt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.update-go {
  flex: none; border: none; border-radius: 999px; padding: 7px 14px;
  background: var(--coral); color: #fff; font-family: inherit; font-weight: 800;
  font-size: 12.5px; cursor: pointer; box-shadow: 0 3px 10px rgba(255, 140, 66, .45);
}
.update-go:active { transform: scale(.98); }
.update-x {
  flex: none; width: 28px; height: 28px; border: none; border-radius: 999px;
  background: rgba(255, 255, 255, .18); color: #fff; font-size: 12px; cursor: pointer;
  font-family: inherit;
}
@keyframes updateIn {
  from { opacity: 0; transform: translate(-50%, -14px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}
@media (max-width: 420px) { .update-bar { font-size: 12px; gap: 7px; padding-left: 12px; } }

/* botón "añadir a pantalla de inicio": solo en móvil y si no está ya instalada */
.install-bar { display: none; }
.install-bar[hidden] { display: none !important; }
@media (max-width: 760px) {
  .install-bar {
    display: flex; align-items: stretch; gap: 6px;
    padding: 0 12px 8px;
  }
  .install-go {
    flex: 1; padding: 11px 12px; border: none; border-radius: 999px;
    background: linear-gradient(120deg, var(--teal), var(--teal-2)); color: #fff;
    font-family: inherit; font-weight: 700; font-size: 12.5px; cursor: pointer; text-align: center;
    box-shadow: 0 4px 12px rgba(0, 122, 140, .35);
  }
  .install-go:active { transform: scale(.99); }
  .install-x {
    width: 40px; border: 1px solid var(--line); border-radius: 999px; background: #fff;
    color: var(--muted); font-size: 13px; cursor: pointer; font-family: inherit;
  }
}

ol#results { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }

.card {
  background: rgba(255, 255, 255, .92);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 11px 13px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(11, 53, 88, .07);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
  backdrop-filter: blur(4px);
}
.card:hover { transform: translateY(-2px); border-color: var(--teal); box-shadow: 0 12px 26px rgba(11,53,88,.14); }
/* Tarjetas de playas que NO son spot del deporte elegido (resultado de la búsqueda) */
.card.other { border-style: dashed; background: rgba(255,255,255,.75); }
.card.other .pos { color: var(--teal); }
/* tarjeta cuya ficha está abierta en el mapa */
.card.sel { border-color: var(--coral); box-shadow: 0 0 0 2px rgba(255,140,66,.35), 0 12px 26px rgba(11,53,88,.14); }

.card .spot-photo {
  display: block; width: 100%; height: 88px; object-fit: cover;
  border-radius: 10px; margin: -2px 0 8px;
}

/* material recomendado (cometa / vela) en las tarjetas del ranking */
.gear-chip {
  display: inline-block; margin-top: 4px; padding: 2px 8px; border-radius: 999px;
  background: var(--aqua-soft); color: var(--navy); font-size: 10.5px; font-weight: 700;
}

.card .rank { display: flex; align-items: center; gap: 10px; }
.card .pos { font-family: var(--font-head); font-weight: 800; color: var(--coral); font-size: 15px; min-width: 24px; }
.card h3 { margin: 0; font-size: 15px; font-weight: 800; color: var(--navy); }
.card .meta { font-size: 12px; color: var(--muted); margin-top: 1px; }

.badge {
  margin-left: auto;
  font-weight: 800;
  font-size: 14.5px;
  white-space: nowrap;
  padding: 4px 12px;
  border-radius: 999px;
  letter-spacing: .2px;
}
/* Puntuación destacada (fichas del mapa y de móvil) */
.badge.lg {
  margin-left: 0; display: inline-flex; align-items: baseline; gap: 4px;
  font-size: 19px; padding: 6px 16px; letter-spacing: .2px;
  box-shadow: 0 3px 10px rgba(11, 53, 88, .16);
}
.badge.lg .lvl { font-size: 12.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; }

.conds { font-size: 12px; color: #4A6A82; margin-top: 7px; }
.conds b { color: var(--navy); }

.reasons { font-size: 12px; margin: 7px 0 0; padding-left: 16px; color: #3F5C6E; }
.reasons li { margin: 2px 0; }
.warn { color: #c77700; }

/* ---------------------------------------------------------------- legend */
.legend {
  position: absolute; z-index: 1000; background: rgba(11, 53, 88, .94); color: #fff; padding: 10px 12px;
  border-radius: 10px; font-size: 12px; right: 12px; bottom: 24px; line-height: 1.8;
  box-shadow: 0 8px 22px rgba(0,0,0,.25);
}
.legend span { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }

/* ---------------------------------------------------------------- footer */
.disclaimer {
  font-size: 11px; color: var(--muted); padding: 9px 18px;
  background: var(--arena); border-top: 1px solid var(--line); text-align: center;
}

/* ---------------------------------------------------------------- responsive */
@media (max-width: 760px) {
  body { height: 100dvh; overflow: hidden; }
  .topbar { gap: 8px; padding: 10px 12px 8px; flex-wrap: wrap; }
  .brand { flex: 1; }
  .logo { width: 40px; height: 40px; }
  .wm1 { font-size: 15px; }
  .wm2 { font-size: 9px; letter-spacing: 3px; }
  .filters-toggle { order: 2; width: 100%; margin: 2px 0 0; }
  .topnav { order: 3; width: 100%; gap: 6px; }
  .topnav button { flex: 1; padding: 6px 6px; font-size: 11.5px; }
  .controls { order: 4; display: none; width: 100%; margin-left: 0; grid-template-columns: 1fr 1fr; gap: 6px 8px; }
  .controls.open { display: grid; }
  .controls label { font-size: 12px; }
  .controls select { width: 100%; }
  .controls button { grid-column: span 2; width: 100%; }
  .mobile-tabs { display: flex; width: 100%; gap: 8px; padding: 4px 12px 10px; }
  .mobile-tabs .vt { flex: 1; padding: 11px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,.9); color: var(--muted); font-weight: 800; font-size: 13px; font-family: inherit; cursor: pointer; }
  .mobile-tabs .vt.active { background: linear-gradient(120deg, var(--teal), var(--teal-2)); color: #fff; border-color: transparent; }
  main { flex: 1; min-height: 0; overflow: hidden; position: relative; }
  main.mode-search #map { display: none; }
  main.mode-search #panel { display: flex; flex: 1; max-height: none; height: auto; }
  main.mode-map #panel { display: none; }
  main.mode-map #map { flex: 1; height: auto; min-height: 0; }
  /* Buscador del mapa abajo, en la zona del pulgar */
  main.mode-map .map-search {
    display: flex; top: auto; bottom: 12px; left: 12px; right: 12px; width: auto;
    border-radius: 999px; box-shadow: 0 8px 24px rgba(4, 18, 32, .28);
  }
  main.mode-map .ms-list { top: auto; bottom: calc(100% + 6px); }
  /* Con la ficha abierta, el buscador estorba */
  body.sheet-open .map-search { display: none !important; }
  /* El botón "volver arriba" estorba encima del buscador en la vista de mapa */
  main.mode-map ~ .back-top { display: none; }
  /* Los controles de Leaflet (atribución) suben por encima del buscador */
  .leaflet-bottom { bottom: 64px; }
  .disclaimer { display: none; }
  .search-wrap { position: sticky; top: -14px; z-index: 5; padding-top: 14px; background: linear-gradient(180deg, var(--cream), rgba(253,251,244,0)); }
  .back-top { display: flex; }
}

@media (min-width: 761px) {
  .filters-toggle { display: none; }
  .mobile-tabs { display: none; }
  .back-top { display: none; }
}

/* ---------------------------------------------------------------- tabs (móvil) */
.mobile-tabs { display: none; }

/* ---------------------------------------------------------------- volver arriba */
.back-top {
  display: none;
  position: fixed;
  bottom: 18px;
  right: 18px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(120deg, var(--teal), var(--teal-2));
  border: none;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .3);
  cursor: pointer;
  z-index: 1200;
}

/* ---------------------------------------------------------------- filtros (móvil) */
.filters-toggle {
  justify-content: center;
  align-items: center;
  gap: 6px;
  background: linear-gradient(120deg, var(--teal), var(--teal-2));
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 11px 16px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .5px;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(255, 140, 66, .35);
  transition: transform .12s ease, box-shadow .12s ease;
}
.filters-toggle:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0, 122, 140, .45); }

/* ---------------------------------------------------------------- top nav buttons */
.topnav { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.topnav button {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .35);
  color: #fff;
  border-radius: 999px;
  padding: 7px 15px;
  font-size: 12.5px;
  font-weight: 700;
  font-family: inherit;
  letter-spacing: .3px;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.topnav button:hover { background: rgba(255, 255, 255, .16); border-color: var(--coral-2); }

/* ---------------------------------------------------------------- modal */
.modal-overlay { position: fixed; inset: 0; z-index: 2000; background: rgba(4, 18, 32, .74); display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-overlay[hidden] { display: none; }
.modal-box {
  background: linear-gradient(180deg, var(--cream) 0%, #fff 100%);
  color: var(--ink);
  border-radius: 18px;
  max-width: 720px;
  width: 100%;
  max-height: 84vh;
  overflow-y: auto;
  padding: 26px 30px 30px;
  position: relative;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .5);
}
.modal-close { position: absolute; top: 12px; right: 16px; border: none; background: transparent; font-size: 28px; line-height: 1; cursor: pointer; color: var(--ink); }
.modal-box h2 { font-family: var(--font-head); margin: 0 26px 8px 0; color: var(--navy); font-size: 24px; }
.modal-box h2 span { color: var(--coral); }
.modal-box h3 { font-family: var(--font-head); margin: 18px 0 4px; font-size: 16px; color: var(--teal); }
.modal-box p, .modal-box li { font-size: 14px; color: #3A576B; line-height: 1.65; }
.modal-box ul, .modal-box ol { padding-left: 22px; margin: 6px 0; }
.modal-box li { margin: 4px 0; }
.modal-box .pill { display: inline-block; background: var(--aqua-soft); color: var(--teal); border-radius: 999px; padding: 3px 11px; font-size: 12px; font-weight: 700; margin: 2px 2px; }
.modal-box .note { background: #fff4e5; border: 1px solid #ffdfae; color: #a35309; border-radius: 10px; padding: 10px 12px; font-size: 12.5px; }
.modal-box .mail { display: inline-block; margin-top: 14px; background: linear-gradient(120deg, var(--coral), var(--coral-2)); color: #fff; padding: 11px 20px; border-radius: 999px; font-weight: 800; text-decoration: none; font-size: 14px; }

/* ---------------------------------------------------------------- explicador de ranking */
.calc-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.calc-chip { background: var(--aqua-soft); color: var(--teal); border: 1px solid #cfe7e1; border-radius: 999px; padding: 6px 12px; font-size: 12px; font-weight: 700; font-family: inherit; cursor: pointer; }
.calc-chip.active { background: linear-gradient(120deg, var(--teal), var(--teal-2)); color: #fff; border-color: transparent; }
.calc-t { width: 100%; border-collapse: collapse; margin: 6px 0; background: #fff; border-radius: 8px; overflow: hidden; }
.calc-t td { padding: 5px 8px; border-bottom: 1px solid #eee6d3; font-size: 12.5px; }
.calc-t td:first-child { color: #6D8578; width: 45%; }
.calc-body { margin-top: 6px; }

.calc-detail { background: #f3f0e6; border: 1px solid #e6dcc2; border-radius: 10px; padding: 10px 12px; margin-top: 8px; font-size: 12.5px; line-height: 1.6; }
.calc-detail ul { margin: 4px 0; padding-left: 18px; }
.calc-detail li { margin: 4px 0; }

/* ---------------------------------------------------------------- buscador flotante del mapa (móvil) */
.map-search { position: absolute; top: 8px; right: 8px; width: min(64%, 280px); z-index: 1000; display: none; }
.ms-ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); opacity: .55; }
.ms-input { width: 100%; padding: 11px 12px 11px 34px; border-radius: 999px; border: none; background: #fff; color: var(--ink); font-size: 14px; font-family: inherit; box-shadow: 0 5px 16px rgba(0,0,0,.22); }
.ms-input:focus { outline: none; }
.ms-list { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: #fff; border-radius: 12px; box-shadow: 0 10px 28px rgba(0,0,0,.28); overflow: hidden; max-height: 260px; overflow-y: auto; z-index: 1000; }
.ms-item { padding: 10px 12px; cursor: pointer; border-bottom: 1px solid var(--line); }
.ms-item:last-child { border-bottom: none; }
.ms-item:hover { background: var(--aqua-soft); }
.ms-item .ms-name { display: block; font-weight: 700; color: var(--navy); font-size: 13px; }
.ms-item .ms-meta { display: block; font-size: 11.5px; color: var(--muted); }


/* ============================ mejoras: spinner, toast, mini-gráfica ============================ */

/* espaciado más fino en tarjetas */
ol#results { gap: 8px; }
.card { padding: 10px 12px; }
.card .meta { font-size: 11.5px; }
.conds { margin-top: 6px; font-size: 11.5px; }
.reasons { font-size: 11.5px; margin: 6px 0 0; }

/* spinner de marca */
.spinner { display: inline-block; width: 14px; height: 14px; border: 2.5px solid var(--aqua-soft); border-top-color: var(--teal); border-radius: 50%; margin-right: 6px; vertical-align: -2px; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* toast */
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--navy); color: #fff; padding: 10px 18px; border-radius: 999px; font-weight: 700; font-size: 13px; z-index: 3000; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); }

/* nota de fuentes de datos dentro de la ficha */
.src-note { margin-top: 5px; font-size: 10.5px; color: #7b8fa1; }
.src-note .src-hint { display: block; margin-top: 1px; font-style: italic; }
.mini-range { float: right; font-size: 10.5px; font-weight: 700; color: var(--teal); }

/* mini-gráfica (viento/olas 24h) en el popup */
.mini-slot { margin-top: 6px; border-top: 1px dashed var(--line); padding-top: 6px; }
.mini-row { margin: 6px 0; }
.mini-row svg { width: 100%; height: 30px; }
.mini-row b { font-size: 11px; color: var(--navy); display: block; margin-bottom: 2px; }

/* selector de fecha dentro de la info del spot */
.fc-row { margin: 6px 0 2px; }
.fc-title { display: block; font-size: 10.5px; font-weight: 800; color: var(--navy); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 4px; }
.fc-btns { display: flex; flex-wrap: wrap; gap: 4px; }
.fc-btn {
  font-family: inherit; font-size: 11.5px; font-weight: 700; padding: 5px 9px;
  border: 1px solid var(--line); background: #fff; color: var(--muted);
  border-radius: 999px; cursor: pointer; line-height: 1;
}
.fc-btn:hover { border-color: var(--teal); color: var(--teal); }
.fc-btn.on { background: linear-gradient(120deg, var(--teal), var(--teal-2)); color: #fff; border-color: transparent; }
/* Desplegable de deporte dentro de la ficha: redondeado, en la paleta de la app */
.fc-select {
  appearance: none; -webkit-appearance: none; width: 100%; margin-top: 2px;
  padding: 8px 30px 8px 11px; border-radius: 999px; cursor: pointer;
  border: 1px solid transparent; color: #fff;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'><path fill='none' stroke='%23FFFFFF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M3 5.5l4 4 4-4'/></svg>"), linear-gradient(120deg, var(--teal), var(--teal-2));
  background-repeat: no-repeat, no-repeat;
  background-position: right 10px center, center;
  background-size: 13px, 100% 100%;
  font-family: inherit; font-weight: 700; font-size: 12.5px;
  text-shadow: 0 1px 1px rgba(0, 0, 0, .12);
  box-shadow: 0 3px 9px rgba(11, 53, 88, .18);
  transition: filter .15s ease, box-shadow .15s ease;
}
.fc-select:hover { filter: brightness(1.08); }
.fc-select:focus { outline: none; box-shadow: 0 0 0 3px rgba(10, 166, 184, .35); }
.fc-select option { color: #16324A; background: #fff; font-weight: 600; }
.fc-loading { font-size: 12px; color: var(--muted); font-weight: 700; margin: 4px 0 6px; }
@media (max-width: 760px) {
  .fc-btn { padding: 8px 11px; font-size: 12.5px; }
}

/* ============================ selector de idioma ============================ */
.lang { position: relative; display: inline-flex; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.14); color: #fff;
  font-family: inherit; font-weight: 700; font-size: 12px; cursor: pointer;
}
.lang-btn:hover { background: linear-gradient(120deg, var(--teal), var(--teal-2)); border-color: transparent; }
.lang .flag { width: 21px; height: 14px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.18); flex: none; }
.lang-code { font-size: 11px; letter-spacing: .5px; }
.lang-caret { font-size: 10px; opacity: .85; }
.lang-menu {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 1200; min-width: 158px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 5px;
  box-shadow: 0 12px 30px rgba(11,53,88,.20);
}
.lang-menu .lang-item {
  display: flex; align-items: center; gap: 9px; width: 100%; padding: 9px 10px; border: none;
  background: transparent; color: var(--navy); font-family: inherit; font-weight: 700; font-size: 13px;
  border-radius: 9px; cursor: pointer; text-align: left;
}
.lang-menu .lang-item span { color: var(--navy); }
.lang-menu .lang-item:hover { background: var(--aqua-soft); border-color: transparent; }
.lang-menu .lang-item.active { background: var(--aqua-soft); box-shadow: inset 0 0 0 1px var(--teal); }
@media (max-width: 760px) {
  .lang-btn { padding: 6px 8px; }
  .lang-code { display: none; }
}

/* ============================ ficha del spot en móvil (capa deslizante) ============================ */
.spot-sheet[hidden], .sheet-backdrop[hidden] { display: none !important; }
.spot-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1900;
  background: #fff; border-radius: 18px 18px 0 0;
  box-shadow: 0 -14px 40px rgba(11, 53, 88, .35);
  max-height: 62vh; display: flex; flex-direction: column;
  transition: max-height .22s ease, transform .22s ease;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.spot-sheet.expanded { max-height: 94vh; }
.spot-sheet::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  border-radius: 18px 18px 0 0; background: linear-gradient(90deg, var(--teal), var(--teal-2), var(--coral));
}
.sheet-head {
  position: relative; display: flex; align-items: center; justify-content: flex-end; gap: 6px;
  padding: 12px 12px 6px; cursor: grab; touch-action: pan-y; flex: none;
}
.sheet-head:active { cursor: grabbing; }
.sheet-grip {
  position: absolute; left: 50%; top: 7px; transform: translateX(-50%);
  width: 46px; height: 5px; border-radius: 999px; background: var(--line);
  pointer-events: none;
}
.sheet-btn {
  position: relative; z-index: 2; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: #fff;
  color: var(--navy); font-size: 15px; font-family: inherit; cursor: pointer; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
}
.sheet-btn:hover { border-color: transparent; background: linear-gradient(120deg, var(--teal), var(--teal-2)); color: #fff; }
.sheet-body { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 4px 14px 18px; }
.sheet-body h3 { margin: 0; font-size: 17px; color: var(--navy); }
.sheet-body .sheet-sub { font-size: 12px; color: var(--muted); margin: 2px 0 8px; }
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 1850; background: rgba(4, 18, 32, .45);
  backdrop-filter: blur(1px);
}
@media (min-width: 761px) {
  .spot-sheet, .sheet-backdrop { display: none !important; }
}
/* En móvil, la ficha se abre en la capa (no como globo del mapa) */
@media (max-width: 760px) {
  .leaflet-popup { display: none !important; }
  .sheet-body .mini-slot { margin-top: 10px; }
  .sheet-body .fc-btn { padding: 9px 12px; }
}

/* ============================ globos del mapa (escritorio) ============================ */
.leaflet-popup-content { margin: 13px 16px; }
.leaflet-popup-content-wrapper { border-radius: 14px; box-shadow: 0 10px 34px rgba(11, 53, 88, .28); }
.lyp-popup .leaflet-popup-content { font-size: 15px; }
