﻿@charset "UTF-8";
/* styles.css - BlueSignal dise�o actualizado con estad�sticas enriquecidas y mejor alineaci�n */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

:root {
  --color-primary: #1976d2;
  --color-primary-dark: #0d47a1;
  --color-secondary: #e3f2fd;
  --color-accent: #fdd835;
  --color-text: #263238;
  --color-light: #ffffff;
  --color-shadow: rgba(0, 0, 0, 0.08);
  --font-main: 'Inter', sans-serif;
  --icon-whale: url("/static/main/icons/whale.6b31f9d2d29c.png");
  --icon-killer-whale: url("/static/main/icons/killer_whale.83171a111885.png");
  --icon-dolphin: url("/static/main/icons/dolphin.80614f489541.png");
  --icon-dolphin-a: url("/static/main/icons/dolphin_a.bec206b16cca.png");
  --icon-seal: url("/static/main/icons/seal.8d83571fc392.png");
  --icon-penguin: url("/static/main/icons/penguin.c47103e7077b.png");
  --icon-turtle: url("/static/main/icons/turtle.dafe0d89ef4b.png");
  --icon-shark: url("/static/main/icons/shark.98c60d944eab.png");
  --icon-unknown: url("/static/main/icons/satellite.9fbe026fc40e.png");
  --bg: #ffffff;
  --fg: #0f172a;
  --muted: #64748b;
  --card: #ffffff;
  --border: #e2e8f0;
  --brand: #2563eb;
  --accent: #16a34a;
  --chip: #ffffff;
  /* Spacing scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  /* Radius scale */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 999px;
  --radius: var(--radius-md);
  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 3px 6px rgba(0,0,0,.12);
  --shadow-lg: 0 8px 24px rgba(0,0,0,.12);
  /* Typography scale */
  --font-size-sm: 0.9rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.1rem;
  --line-height-tight: 1.35;
  --line-height-normal: 1.5;
}

body {
  font-family: var(--font-main);
  font-size: 16px;
  line-height: 1.5;
  background-color: var(--color-secondary);
  margin: 0;
  padding: 0;
  color: var(--color-text);
  overflow-x: hidden;
}
/* Ensure padding doesn't add overflow on mobile */
*, *::before, *::after { box-sizing: border-box; }

/* Offline banner */
.offline-banner {
  position: sticky;
  top: 0;
  z-index: 1400;
  width: 100%;
  padding: 10px 14px;
  text-align: center;
  font-weight: 700;
  letter-spacing: .01em;
  background: #dc2626;
  color: #fff;
  box-shadow: 0 8px 20px rgba(15,23,42,.2);
}

/* Probabilidad diaria widget (estilo clima) */
.prob-widget {
  position: relative;
  display: block;
  padding: 1.2rem 1.6rem 1.25rem;
  border-radius: 18px;
  color: #fff;
  background: var(--prob-bg, linear-gradient(135deg, #1976d2, #64b5f6));
  box-shadow: 0 10px 28px rgba(37,99,235,.28);
  overflow: visible;
  isolation: isolate;
  transition: transform .2s ease, box-shadow .2s ease;
}
.prob-widget::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 5px;
  width: var(--prob-ghost, 0%);
  width: max(6%, var(--prob-ghost, 0%));
  background: #fff;
  opacity: .18;
  border-radius: 0 999px 999px 0;
  pointer-events: none;
  transition: width .6s ease-out;
}
.prob-widget:active { transform: scale(.99); box-shadow: 0 8px 18px rgba(37,99,235,.25); }
.prob-stack { display: grid; gap: 10px; position: relative; z-index: 1; }
.prob-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; width: 100%; }
.prob-row > * { min-width: 0; }
.prob-header { display: grid; gap: 4px; }
.prob-header-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.prob-icon { width: 22px; height: 22px; object-fit: contain; }
.prob-header-title { font-weight: 700; letter-spacing: .02em; font-size: .95rem; min-width: 0; }
.prob-header-sub { font-size: .8rem; opacity: .75; }
.prob-row--main { display: grid; gap: 10px; justify-items: start; }
.prob-row--phrase { justify-content: flex-start; }
.prob-row--groups { justify-content: flex-start; gap: 16px; }
.prob-row--metrics { justify-content: flex-start; gap: 16px; }
.prob-row--meta { justify-content: flex-end; flex-direction: column; align-items: flex-end; gap: 2px; }
.prob-caption { font-weight: 700; letter-spacing: .01em; line-height: 1.1; }
.prob-main-group { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 10px; flex: 0 0 100%; width: 100%; }
.prob-sep {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 12px;
  height: 12px;
  opacity: .8;
}
.prob-sep::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255,255,255,.85);
}
.prob-main-value { display: inline-flex; align-items: center; justify-content: flex-start; gap: 8px; flex-wrap: wrap; flex: 0 0 100%; width: 100%; text-align: left; }
.prob-phrase { font-size: .85rem; opacity: .85; text-align: left; max-width: 520px; }
.prob-value { font-size: clamp(2.2rem, 4.5vw, 2.8rem); font-weight: 800; line-height: 1; letter-spacing: -0.02em; }
.prob-level { font-weight: 700; padding: 0; border-radius: 0; background: transparent; box-shadow: none; }
.prob-mini {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  row-gap: 6px;
  column-gap: 10px;
  align-items: center;
  width: 100%;
}
.prob-mini__label { font-weight: 600; opacity: .92; white-space: nowrap; grid-column: 1; grid-row: 1; }
.prob-mini__value { font-weight: 700; letter-spacing: .01em; white-space: nowrap; grid-column: 2; grid-row: 1; justify-self: end; }
.prob-mini__bar {
  grid-column: 1 / -1;
  grid-row: 2;
  min-width: 0;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.28);
  overflow: visible;
  box-shadow: inset 0 1px 2px rgba(0,0,0,.12);
}
.prob-mini__bar .fill {
  display: block;
  height: 100%;
  width: var(--value, 0%);
  background: #fff;
  transition: width .6s ease-out;
}
.prob-section {
  width: 100%;
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
  overflow: visible;
}
.prob-section__head { display: grid; gap: 2px; }
.prob-section__title { font-size: .85rem; font-weight: 700; letter-spacing: .01em; }
.prob-section__note { font-size: .75rem; opacity: .8; }
.prob-recent-list { display: grid; gap: 10px; }
.prob-recent-item { display: grid; gap: 2px; font-size: .85rem; }
.prob-recent-label { font-weight: 600; }
.prob-recent-meta { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; flex-wrap: wrap; }
.prob-recent-sep { opacity: .75; }
.prob-tag { display: inline-flex; align-items: center; padding: 2px 6px; border-radius: 999px; background: rgba(255,255,255,.18); font-size: .7rem; font-weight: 700; letter-spacing: .02em; }
.prob-info-wrap { position: relative; display: inline-flex; align-items: center; z-index: 0; }
.prob-info-wrap.is-open { z-index: 6; }
.prob-info-target {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  text-align: left;
  white-space: nowrap;
  touch-action: manipulation;
}
.prob-tooltip {
  position: fixed;
  left: 0;
  top: 0;
  transform: translateY(-4px);
  width: 220px;
  max-width: 70vw;
  padding: 6px 8px;
  border-radius: 8px;
  background: #0f172a;
  color: #fff;
  font-size: .75rem;
  line-height: 1.3;
  white-space: normal;
  overflow-wrap: break-word;
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 8px 16px rgba(15,23,42,.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease, transform .15s ease;
  z-index: 999;
}
.prob-tooltip.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.prob-info-target:focus-visible {
  outline: 2px solid rgba(255,255,255,.7);
  outline-offset: 2px;
}
.prob-updated { font-size: .8rem; opacity: .65; text-align: right; margin-top: 0; }


.prob-widget.is-hot .prob-value { animation: probPulse 8s ease-in-out infinite; }
.prob-widget.is-fresh .prob-updated { animation: probFade 0.45s ease-out 0.1s both; }

@keyframes probPulse {
  0%, 80%, 100% { transform: translateY(0); text-shadow: 0 6px 18px rgba(0,0,0,.16); }
  45% { transform: translateY(-1px) scale(1.01); text-shadow: 0 10px 24px rgba(0,0,0,.2); }
}

@keyframes probFade {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: .82; transform: translateY(0); }
}

@media (max-width: 640px) {
  .prob-widget { padding: 1rem; border-radius: 16px; }
  .prob-row--main { flex-direction: column; align-items: flex-start; }
  .prob-main-value { align-items: center; gap: 8px; }
  .prob-row--groups,
  .prob-row--metrics { flex-direction: column; align-items: stretch; }
  .prob-mini { width: 100%; display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; row-gap: 6px; column-gap: 10px; }
  .prob-mini__bar { grid-column: 1 / -1; min-width: 0; width: 100%; }
  .prob-mini__label,
  .prob-mini__value { white-space: normal; }
  .prob-phrase { font-size: .8rem; max-width: 100%; }
  .prob-updated { text-align: left; }
  .prob-row--meta { align-items: flex-start; }
  .prob-value { font-size: clamp(2rem, 8vw, 2.6rem); }
}
@media (max-width: 400px) {
  .prob-widget { padding: 1rem 1.1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .prob-widget,
  .prob-mini__bar .fill,
  .prob-widget.is-hot .prob-value,
  .prob-widget.is-fresh .prob-updated { animation: none !important; transition: none !important; }
}

/* Popup card for map markers */
.popup-card { font-size: .85rem; min-width: 230px; max-width: 260px; line-height: 1.4; }
.popup-header { display:flex; align-items:center; gap:.45rem; margin-bottom:.25rem; }
.popup-emoji { width:24px; height:24px; border-radius:999px; display:flex; align-items:center; justify-content:center; background:rgba(25,118,210,.08); }
.popup-emoji span{font-size:1.1rem;}
.popup-emoji[class*="ep--"],
.nearby-emoji[class*="ep--"],
.report-detail__emoji[class*="ep--"],
.emoji-pin[class*="ep--"] .ep {
  background-repeat: no-repeat;
  background-position: center;
}
.popup-emoji[class*="ep--"] { background-size: 16px 16px; }
.nearby-emoji[class*="ep--"] {
  display: inline-flex;
  width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
  background-size: 18px 18px;
}
.emoji-pin[class*="ep--"] .ep { background-size: 22px 22px; }
.report-detail__emoji[class*="ep--"] {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  background-size: 28px 28px;
  background-color: transparent;
  border: none;
  border-radius: 0;
  font-size: 0;
  vertical-align: -0.1em;
}
.popup-emoji.ep--whale,
.nearby-emoji.ep--whale,
.report-detail__emoji.ep--whale,
.emoji-pin.ep--whale .ep { background-image: var(--icon-whale); }
.popup-emoji.ep--orca,
.nearby-emoji.ep--orca,
.report-detail__emoji.ep--orca,
.emoji-pin.ep--orca .ep { background-image: var(--icon-killer-whale); }
.popup-emoji.ep--dolphin,
.nearby-emoji.ep--dolphin,
.report-detail__emoji.ep--dolphin,
.emoji-pin.ep--dolphin .ep { background-image: var(--icon-dolphin); }
.popup-emoji.ep--dolphin-a,
.nearby-emoji.ep--dolphin-a,
.report-detail__emoji.ep--dolphin-a,
.emoji-pin.ep--dolphin-a .ep { background-image: var(--icon-dolphin-a); }
.popup-emoji.ep--seal,
.nearby-emoji.ep--seal,
.report-detail__emoji.ep--seal,
.report-detail__emoji[data-especie*="lobo marino"],
.report-detail__emoji[data-especie*="elefante marino"],
.report-detail__emoji[data-especie*="foca"],
.emoji-pin.ep--seal .ep { background-image: var(--icon-seal); }
.popup-emoji.ep--penguin,
.nearby-emoji.ep--penguin,
.report-detail__emoji.ep--penguin,
.emoji-pin.ep--penguin .ep { background-image: var(--icon-penguin); }
.popup-emoji.ep--turtle,
.nearby-emoji.ep--turtle,
.report-detail__emoji.ep--turtle,
.emoji-pin.ep--turtle .ep { background-image: var(--icon-turtle); }
.popup-emoji.ep--shark,
.nearby-emoji.ep--shark,
.report-detail__emoji.ep--shark,
.emoji-pin.ep--shark .ep { background-image: var(--icon-shark); }
.popup-emoji.ep--unknown,
.nearby-emoji.ep--unknown,
.report-detail__emoji.ep--unknown,
.emoji-pin.ep--unknown .ep { background-image: var(--icon-unknown); }
[data-theme="dark"] .report-detail__emoji.ep--seal,
[data-theme="dark"] .report-detail__emoji[data-especie*="lobo marino"],
[data-theme="dark"] .report-detail__emoji[data-especie*="elefante marino"],
[data-theme="dark"] .report-detail__emoji[data-especie*="foca"] {
  filter: brightness(1.2) drop-shadow(0 0 1px rgba(255,255,255,.5));
}
.popup-emoji[class*="ep--"] span,
.nearby-emoji[class*="ep--"] span,
.emoji-pin[class*="ep--"] .ep span { display: none; }
.popup-title-wrap { display:flex; flex-direction:column; }
.popup-title, .popup-title-link { font-weight: 700; }
.popup-title-link { color: inherit; text-decoration:none; }
.popup-title-link:hover, .popup-title-link:focus { text-decoration:underline; }
.popup-sub { opacity: .85; font-size: .8rem; }
.popup-body { padding-top:.35rem; margin-top:.15rem; border-top:1px solid rgba(0,0,0,.06); }
.popup-meta { opacity: .75; font-size: .78rem; }
.popup-meta + .popup-meta { margin-top: .1rem; }
.popup-actions { margin-top: .5rem; display: flex; justify-content: flex-end; }
.popup-detail {
  font-size: .78rem;
  padding: .25rem .7rem;
  border-radius: 999px;
  background: #2563eb;
  color: #fff !important;
  border: none;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  margin-right: .35rem;
}
.popup-detail:hover,
.popup-detail:focus {
  background: #1d4ed8;
}
.popup-share {
  font-size: .78rem;
  padding: .25rem .7rem;
  border-radius: 999px;
  background: #25d366;
  color: #fff !important;
  border: none;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
  display: inline-flex;
  align-items: center;
  gap: .25rem;
}
.popup-share:hover,
.popup-share:focus {
  background: #1ebe5b;
}

.popup-policy { margin-top: .4rem; }
.policy-badge {
  display: inline-flex;
  align-items: flex-start;
  gap: .5rem;
  padding: .5rem .6rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(15,23,42,.04);
}
.nearby-policy .policy-badge {
  min-height: 0;
}
.policy-ico {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .72rem;
  font-weight: 700;
  background: rgba(15,23,42,.12);
}
.policy-text { display:flex; flex-direction:column; gap:6px; }
.policy-label { font-weight: 700; font-size: .85rem; }

.policy-what {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
}
.policy-badge + .policy-what { margin-top: 8px; }
.policy-what + .policy-what { margin-top: 6px; }
.policy-what__title {
  font-size: .72rem;
  letter-spacing: .02em;
  text-transform: uppercase;
  opacity: .6;
}
.policy-what__body {
  font-size: .85rem;
  line-height: 1.35;
  color: var(--fg);
}
.policy-badge[data-policy="en_peligro"] { background:#ffe4e6; border-color:#fecdd3; color:#9f1239; }
.policy-badge[data-policy="no_molestar"] { background:#fef3c7; border-color:#fde68a; color:#92400e; }
.policy-badge[data-policy="sensible"] { background:#fef3c7; border-color:#fde68a; color:#92400e; }
.policy-badge[data-policy="observacion_segura"] { background:#ecfdf3; border-color:#bbf7d0; color:#166534; }

/* Report form (reportar_avistaje) */
.report-page { max-width: 860px; margin: 0 auto; padding: 1rem; }
.report-header { margin: .25rem 0 1rem; }
.report-header h1 { font-size: 1.75rem; margin: 0 0 .25rem; }
.report-header p { margin: 0; opacity: .8; }

.card { background: #fff; border: 1px solid rgba(0,0,0,.06); border-radius: 12px; box-shadow: 0 4px 10px rgba(0,0,0,.05);
        margin: 1rem 0; overflow: hidden; transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
.card:hover, .card:focus-within { border-color: rgba(25,118,210,.25); box-shadow: 0 8px 26px rgba(25,118,210,.12); transform: translateY(-2px); }
.card h2{position:relative}
.card:hover h2::after, .card:focus-within h2::after{content:""; position:absolute; left:1rem; bottom:.5rem; height:2px; width:44px; background: var(--color-primary, #1976d2); border-radius:2px; opacity:.85}
.card h2 { font-size: 1rem; letter-spacing: .02em; text-transform: uppercase; margin: 0; padding: .9rem 1rem; opacity: .8; }
.card .body { padding: 1rem; }

/* Report detail (avistaje_detalle) */
.report-detail { max-width: 860px; margin: 1.5rem auto; padding: 0 1rem; }
.report-detail__header {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  flex-wrap: wrap;
  gap:.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(0,0,0,.06);
}
.report-detail__title { margin:0; font-size:1.6rem; font-weight:700; min-width: 0; line-height:1.2; display:flex; align-items:center; gap:.5rem; }
.report-detail__emoji { margin-right:0; flex:0 0 auto; align-self:center; }
.report-detail__meta {
  margin: 0;
  opacity: .8;
  font-size: .9rem;
  text-align: right;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .5rem;
  flex-wrap: wrap;
}
.report-detail__meta-item { display: inline-flex; align-items: center; gap: .35rem; }
.report-detail__meta-dot { opacity: .6; }
.report-detail__meta-ico {
  width: 14px;
  height: 14px;
  display: inline-block;
  background: currentColor;
  opacity: .75;
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
}
.report-detail__meta-ico--calendar {
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M7 2a1 1 0 0 1 1 1v1h8V3a1 1 0 1 1 2 0v1h1a3 3 0 0 1 3 3v12a3 3 0 0 1-3 3H5a3 3 0 0 1-3-3V7a3 3 0 0 1 3-3h1V3a1 1 0 0 1 1-1Zm12 8H5v9a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-9Z'/></svg>");
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M7 2a1 1 0 0 1 1 1v1h8V3a1 1 0 1 1 2 0v1h1a3 3 0 0 1 3 3v12a3 3 0 0 1-3 3H5a3 3 0 0 1-3-3V7a3 3 0 0 1 3-3h1V3a1 1 0 0 1 1-1Zm12 8H5v9a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-9Z'/></svg>");
}
.report-detail__meta-ico--location {
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M12 2a7 7 0 0 1 7 7c0 4.418-4.276 9.41-6.19 11.405a1.2 1.2 0 0 1-1.72 0C9.276 18.41 5 13.418 5 9a7 7 0 0 1 7-7Zm0 4a3 3 0 1 0 0 6 3 3 0 0 0 0-6Z'/></svg>");
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M12 2a7 7 0 0 1 7 7c0 4.418-4.276 9.41-6.19 11.405a1.2 1.2 0 0 1-1.72 0C9.276 18.41 5 13.418 5 9a7 7 0 0 1 7-7Zm0 4a3 3 0 1 0 0 6 3 3 0 0 0 0-6Z'/></svg>");
}
.report-detail__body { display:flex; flex-direction:column; gap:1rem; }
.report-detail__media {
  border-radius:10px;
  overflow:hidden;
  background:#000;
  aspect-ratio: 16 / 9;
}
.report-detail__media img,
.report-detail__media video {
  display:block;
  width:100%;
  height:100%;
}
.report-detail__media img {
  object-fit:cover;
}
.report-detail__media video {
  object-fit:contain;
}
.report-detail__media--empty {
  background: #f8fafc;
  border: 2px dashed rgba(148,163,184,.45);
  padding: 1.4rem 1.2rem;
  color: rgba(15,23,42,.75);
  font-size: .92rem;
  display: grid;
  justify-items: center;
  gap: .35rem;
  text-align: center;
  aspect-ratio: auto;
  min-height: 180px;
  overflow: visible;
}
.report-detail__info {
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap:.5rem 1.5rem;
  margin:0;
}
.report-detail__info dt {
  font-weight:600;
  font-size:.85rem;
  opacity:.8;
}
.report-detail__info dd {
  margin:0;
  font-size:.95rem;
  overflow-wrap: anywhere;
}
[data-theme="dark"] .report-detail__media--empty {
  background: rgba(15,23,42,.35);
  border-color: rgba(148,163,184,.4);
  color: rgba(255,255,255,.82);
}
.report-detail__coords {
  margin:0;
  font-size:.85rem;
  opacity:.85;
}
.report-detail__comment {
  margin:0;
  font-size:.95rem;
  line-height:1.5;
}
.report-detail__comment-box {
  margin-top:.75rem;
  padding:.75rem 1rem;
  border-radius:10px;
  background:rgba(0,0,0,.02);
  border:1px solid rgba(0,0,0,.06);
}
.report-detail__policy {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: .75rem 1rem;
  background: #fff;
}
.report-detail__policy .policy-badge { margin: 0; }
.report-detail__policy-body {
  margin-top: .6rem;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  display: grid;
  gap: .6rem;
}
.report-detail__policy-block { display: grid; gap: .2rem; }
.report-detail__policy-title {
  font-size: .72rem;
  letter-spacing: .02em;
  text-transform: uppercase;
  opacity: .6;
}
.report-detail__policy-text { font-size: .9rem; line-height: 1.4; }
.report-detail__policy-list { margin: 0; padding: 0; font-size: .9rem; line-height: 1.4; list-style: none; }
.report-detail__policy-list li { margin: .2rem 0; }
[data-theme="dark"] .report-detail__policy {
  background: rgba(255,255,255,.02);
  border-color: rgba(255,255,255,.12);
}
[data-theme="dark"] .report-detail__policy-body { background: transparent; border-color: transparent; }
[data-theme="dark"] .report-detail__policy .policy-badge {
  background: rgba(255,255,255,.04);
  border-color: rgba(255,255,255,.2);
}
[data-theme="dark"] .report-detail__policy .policy-badge[data-policy="no_molestar"] {
  background: rgba(127,29,29,.45);
  border-color: rgba(248,113,113,.55);
  color: #fee2e2;
}
[data-theme="dark"] .report-detail__policy .policy-badge[data-policy="en_peligro"] {
  background: rgba(190,18,60,.45);
  border-color: rgba(244,63,94,.6);
  color: #ffe4e6;
}
[data-theme="dark"] .report-detail__policy .policy-badge[data-policy="sensible"] {
  background: rgba(120,53,15,.45);
  border-color: rgba(245,158,11,.55);
  color: #fde68a;
}
[data-theme="dark"] .report-detail__policy .policy-badge[data-policy="observacion_segura"] {
  background: rgba(22,101,52,.45);
  border-color: rgba(34,197,94,.55);
  color: #bbf7d0;
}
[data-theme="dark"] .report-detail__comment-box {
  background:rgba(255,255,255,.04);
  border-color:rgba(255,255,255,.15);
}
.report-detail__comment-title {
  font-weight:600;
  font-size:.9rem;
  margin-bottom:.25rem;
}
.report-detail__actions {
  display:flex;
  justify-content:flex-end;
}
.report-detail__footer {
  margin-top:.75rem;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.75rem;
  flex-wrap:wrap;
}
@media (max-width: 900px){
  .report-detail__info { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 640px){
  .report-detail__header { flex-direction: column; align-items:flex-start; }
  .report-detail__meta { text-align: left; justify-content: flex-start; }
}
@media (max-width: 375px){
  .report-detail__meta { font-size: .82rem; }
}
@media (max-width: 520px){
  .report-detail__info { grid-template-columns: 1fr; }
}
[data-theme="dark"] .report-detail__coords a {
  color:#64b5f6;
}
.report-detail__coords a {
  color: var(--color-primary-dark);
  text-decoration: underline;
}
[data-theme="dark"] .report-detail__media--empty {
  background: rgba(15,23,42,.35);
  border-color: rgba(148,163,184,.4);
  color: rgba(255,255,255,.82);
}
.report-detail__media-empty-icon {
  width: 46px;
  height: 46px;
  border-radius: 999px;
  background: rgba(148,163,184,.2);
  border: 1px solid rgba(148,163,184,.35);
  position: relative;
  color: #64748b;
}
.report-detail__media-empty-icon::before {
  content: "";
  position: absolute;
  inset: 11px;
  opacity: .75;
  background: no-repeat center/contain;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='currentColor' d='M18.3 5.7a1 1 0 0 1 0 1.4L13.4 12l4.9 4.9a1 1 0 1 1-1.4 1.4L12 13.4l-4.9 4.9a1 1 0 1 1-1.4-1.4L10.6 12 5.7 7.1a1 1 0 1 1 1.4-1.4L12 10.6l4.9-4.9a1 1 0 0 1 1.4 0Z'/></svg>");
}
.report-detail__media-empty-title { font-weight: 700; font-size: .98rem; }
.report-detail__media-empty-text { font-size: .85rem; opacity: .7; max-width: 340px; line-height: 1.4; }

.grid { display: grid; grid-template-columns: 1fr; gap: .75rem; }
@media (min-width: 640px) { .grid.cols-2 { grid-template-columns: 1fr 1fr; } }
.grid .field { min-width: 0; }

.field label { display: block; font-weight: 600; margin: .25rem 0 .35rem; }
.field--checkbox .checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-weight: 600;
  margin: .25rem 0 .35rem;
}
.field--checkbox input[type="checkbox"] { width: 16px; height: 16px; }
.field input[type="text"], .field input[type="number"], .field select, .field textarea {
  display: block; width: 100%; max-width: 100%; box-sizing: border-box;
  border: 1px solid rgba(0,0,0,.15); background: transparent; color: inherit;
  border-radius: 10px; padding: .65rem .75rem; font: inherit; outline: none;
}
.help, .error { font-size: .85rem; margin-top: .35rem; }
.help { opacity: .7; }
.error { color: #c62828; }

/* Emoji helpers for labels (scoped) */
.report-page label[for="id_especie"]::before { content: "🐋 "; }
.report-page label[for="id_cantidad_individuos"]::before { content: "📈 "; }
.report-page label[for="id_comportamiento"]::before { content: "🎬 "; }
.report-page label[for="id_distancia_estimada"]::before { content: "📏 "; }
.report-page label[for="id_estado_mar"]::before { content: "🌊 "; }
.report-page label[for="id_condicion_cielo"]::before { content: "☁️ "; }
.report-page label[for="id_direccion_movimiento"]::before { content: "🧭 "; }
.report-page label[for="id_comentario"]::before { content: "📝 "; }
.report-page label[for="id_foto"]::before { content: "📎 "; }
.report-page label::before { opacity: .9; }

.radio-cards { display: grid; grid-template-columns: 1fr; gap: .5rem; }
@media (min-width: 520px) { .radio-cards { grid-template-columns: 1fr 1fr; } }
.radio-card { display: flex; gap: .75rem; align-items: center; cursor: pointer;
  border: 1px solid rgba(0,0,0,.12); border-radius: 10px; padding: .75rem .85rem; transition: .15s ease; }
.radio-card:hover { box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.radio-card input[type="radio"] { accent-color: var(--color-primary, #1976d2); }

.actions { display: flex; gap: .75rem; justify-content: flex-end; margin-top: 1rem; }
.btn { appearance: none; border: 1px solid transparent; padding: .7rem 1rem; border-radius: 10px; cursor: pointer; font: inherit; text-decoration: none; }
.btn.primary { background: var(--color-primary, #1976d2); color: #fff; }
.btn.secondary { background: transparent; border-color: rgba(0,0,0,.2); color: inherit; }

.gps-status { min-height: 1.25rem; }

/* Upload tile */
.upload-tile { display:flex; align-items:center; justify-content:center; flex-direction:column; gap:.25rem;
  border: 2px dashed rgba(0,0,0,.2); border-radius: 12px; padding: 1rem; cursor: pointer; text-align:center; transition: transform .15s ease, background .15s ease, border-color .15s ease; }
.upload-tile .icon { font-size: 1.6rem; }
.upload-tile .sub { font-size: .85rem; opacity: .7; }
.upload-tile:hover, .upload-tile.is-drag { background: rgba(25,118,210,.06); border-color: rgba(25,118,210,.5); transform: translateY(-1px); }
.upload-preview { margin-top: .5rem; display: none; }
.upload-preview img, .upload-preview video { max-width: 100%; border-radius: 10px; display: block; }
/* Remove duplicated emoji/paperclip on upload label tile */
#upload-tile::before { content: none !important; }

/* Hide native file input but keep accessible via label */
.field input[type="file"]{ position: absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); border:0; }

/* Dark mode for report */
[data-theme="dark"] .card { background: #121417; border-color: rgba(255,255,255,.09); box-shadow: none; }
[data-theme="dark"] .btn.secondary { border-color: rgba(255,255,255,.18); }
[data-theme="dark"] .error { color: #ef5350; }
[data-theme="dark"] .upload-tile { border-color: rgba(255,255,255,.18); }
[data-theme="dark"] .upload-tile:hover, [data-theme="dark"] .upload-tile.is-drag { background: rgba(255,255,255,.06); border-color: rgba(100,181,246,.6); }
/* Footer (site-wide) */
.site-footer{margin-top:3rem;padding:2rem 1rem;background:#f7f9fc;border-top:1px solid rgba(0,0,0,.06)}
.site-footer .footer-content{max-width:1400px;margin:0 auto;display:grid;row-gap:1rem;column-gap:1rem;grid-template-columns:1fr;align-items:center;justify-items:center;text-align:center;width:100%;box-sizing:border-box}
.site-footer .footer-brand{text-align:center;display:flex;flex-direction:column;align-items:center;gap:.15rem}
.site-footer .footer-logo{width:128px;height:128px;object-fit:contain}
.site-footer .footer-title{font-weight:600;color:var(--color-primary);font-size:1rem;letter-spacing:.1px;line-height:1.2;white-space:nowrap}
.site-footer .footer-sub{opacity:.72;font-size:.85rem}
.site-footer .footer-actions{display:flex;gap:1rem;align-items:center;justify-content:center;flex-wrap:wrap}
.site-footer .footer-contact{display:flex;gap:.75rem;flex-wrap:wrap;justify-content:center;margin:0}
.site-footer .contact-item{color:inherit;text-decoration:none;border-bottom:1px dotted transparent}
.site-footer .contact-item:hover{border-bottom-color:currentColor}
.site-footer .footer-contact .contact-item + .contact-item::before{content:'·';margin:0 .5rem;opacity:.5}
.site-footer .footer-social{display:flex;gap:.6rem;justify-content:center;margin:0}
.site-footer .social-link{color:#6b7785;display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:10px;background:transparent;border:1px solid rgba(0,0,0,.15);transition:all .18s ease}
.site-footer .social-link svg{width:20px;height:20px}
.site-footer .social-link:hover{color:var(--color-primary);border-color:rgba(25,118,210,.5);background:rgba(25,118,210,.06);transform:translateY(-1px)}
.site-footer .footer-bottom{display:none}
@media(max-width:640px){.site-footer .footer-logo{width:104px;height:104px}}
@media(max-width:640px){.site-footer .footer-title{font-size:.95rem;line-height:1.25;letter-spacing:0}}
@media(max-width:640px){.site-footer .footer-sub{font-size:.8rem}}
@media(max-width:640px){.site-footer{overflow:hidden}.site-footer .footer-content{width:100%;max-width:100%;padding:0 1rem;box-sizing:border-box}}
@media(min-width:760px){.site-footer .footer-content{grid-template-columns:1fr}.site-footer .footer-brand{text-align:center}.site-footer .footer-social{justify-content:center}}
[data-theme="dark"] .site-footer{background:#0c1116;border-color:rgba(255,255,255,.06)}
[data-theme="dark"] .site-footer .social-link{background:transparent;color:#c2c8ce;border-color:rgba(255,255,255,.18)}
[data-theme="dark"] .site-footer .social-link:hover{background:rgba(255,255,255,.06);color:#64b5f6;border-color:rgba(100,181,246,.6)}
[data-theme="dark"] .site-footer .footer-bottom{border-color:rgba(255,255,255,.06)}

main {
  padding: 2rem 1rem;
  /* Ampl?a el ancho usable del contenido principal para que los gr?ficos aprovechen m?s el espacio */
  max-width: 1400px;
  margin: auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.hero {
  text-align: center;
}

.hero h2 {
  font-size: 2.2rem;
  color: var(--color-primary-dark);
}

.hero p {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.hero .actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.button,
.button-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 40px;
  padding: 0.65rem 1.2rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.button {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
  box-shadow: var(--shadow-md);
}

.button:hover {
  background: var(--color-primary-dark);
}

.button-outline {
  background: var(--card);
  color: var(--fg);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.button-outline:hover {
  background: var(--bg);
  box-shadow: var(--shadow-md);
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  text-align: center;
}

.stats .card {
  background: var(--color-light);
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: 0 2px 4px var(--color-shadow);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
}

.stats h3 {
  margin: 0;
  color: var(--color-primary);
  font-size: 1.4rem;
}

.stats .icon {
  font-size: 1.8rem;
  margin-bottom: 0.25rem;
  color: var(--color-primary-dark);
}

.stats .label {
  font-size: 0.95rem;
  color: #666;
}

.map-container {
  height: 400px;
  width: 100%;
  background: var(--color-secondary);
  border: 2px solid var(--color-primary);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}


@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(25, 118, 210, 0.4);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(25, 118, 210, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(25, 118, 210, 0);
  }
}

.avistajes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.avistaje-card {
  background: white;
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: 0 2px 6px var(--color-shadow);
}

.avistaje-card h4 {
  margin: 0 0 0.5rem;
  color: var(--color-primary);
  font-size: 1.1rem;
}

.avistaje-card p {
  margin: 0.25rem 0;
  font-size: 0.95rem;
}

footer {
  background-color: var(--color-primary-dark);
  color: white;
  text-align: center;
  padding: 1.5rem 1rem;
  margin-top: 3rem;
  font-size: 0.9rem;
}

@media (min-width: 768px) {
  header h1 {
    font-size: 2.2rem;
  }
  .hero h2 {
    font-size: 2.4rem;
  }
}

h3 {
  color: #1976d2;       /* azul primario */
  text-align: center;   /* centrado horizontal */
  font-weight: 700;     /* negrita para mejor presencia */
  font-size: 2.2rem;    /* tama�o adecuado para un encabezado */
  margin-bottom: 1rem;  /* espacio debajo */
  font-family: 'Inter', sans-serif; /* para mantener la tipograf�a general */
}

.leaflet-control-fullscreen .leaflet-control-fullscreen-button,
.leaflet-control-zoom-fullscreen {
  background-color: var(--card) !important;
  border: 1px solid var(--border) !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}
.fullscreen-icon {
  background-image: none !important;
  position: relative;
}
.fullscreen-icon::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("https://unpkg.com/leaflet.fullscreen@1.6.0/icon-fullscreen.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 22px 22px;
  pointer-events: none;
}
.leaflet-retina .fullscreen-icon::before {
  background-image: url("https://unpkg.com/leaflet.fullscreen@1.6.0/icon-fullscreen-2x.png");
  background-size: 22px 22px;
}
[data-theme="dark"] .fullscreen-icon::before {
  filter: invert(1) brightness(1.15);
}






/* --- Estilos para el nuevo formulario --- */

/* --- Material Design Mobile-First Adaptado --- */
.report-page {
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    line-height: 1.5;
    --radius: 8px;
}
/* Header */
.report-page .form-header h1 {
    color: var(--color-primary-dark);
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}
.report-page .form-header p {
    font-size: 0.95rem;
    color: #616161;
}

/* Tarjetas */
.report-page .form-card {
    background-color: var(--color-light);
    border-radius: var(--radius);
    box-shadow: 0 1px 4px var(--color-shadow);
    margin-bottom: 1rem;
    padding: 1rem;
}
.report-page .card-header {
    background-color: #E3F2FD;
    color: var(--color-primary-dark);
    padding: 0.75rem 1rem;
    font-weight: 500;
    font-size: 1rem;
    border-bottom: 1px solid #BBDEFB;
}
.report-page .card-body {
    padding: 1rem;
}

/* Radio buttons */
.report-page .radio-option {
    display: flex;
    align-items: flex-start;
    padding: 0.75rem;
    border: 1px solid #E0E0E0;
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
    cursor: pointer;
    background-color: white;
    transition: all 0.2s ease;
}
.report-page .radio-option:hover {
    background-color: #F5F9FF;
    border-color: var(--color-primary);
}
.report-page .radio-option input[type="radio"] {
    accent-color: var(--color-primary);
    margin-top: 0.25rem;
    margin-right: 0.75rem;
}

/* Labels fijos */
.report-page .field-group label,
.report-page .form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: #616161;
    margin-bottom: 0.25rem;
}

/* Inputs */
.report-page input[type="text"],
.report-page input[type="number"],
.report-page input[type="email"],
.report-page input[type="tel"],
.report-page input[type="url"],
.report-page select,
.report-page textarea {
    width: 100%;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 1rem;
    background-color: transparent;
    transition: border-color 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}
.report-page input:focus,
.report-page select:focus,
.report-page textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    background-color: #FAFAFA;
    box-shadow: 0 0 0 3px rgba(25,118,210,.12);
}
.report-page input:disabled,
.report-page select:disabled,
.report-page textarea:disabled {
    background-color: #F5F5F5;
    border-color: #E0E0E0;
    cursor: not-allowed;
}
[data-theme="dark"] .report-page input:disabled,
[data-theme="dark"] .report-page select:disabled,
[data-theme="dark"] .report-page textarea:disabled {
    background-color: #1a1f26;
    border-color: #2c3340;
    color: #b8c1d1;
    opacity: 1;
}

/* Select flecha */
.report-page select {
    appearance: none;
    background: transparent url("data:image/svg+xml;utf8,<svg fill='%23757575' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>") no-repeat right 0.75rem center;
    background-size: 1rem;
    padding-right: 2rem;
}
[data-theme="dark"] .report-page select {
    color-scheme: dark;
    color: var(--fg);
    border-color: var(--border);
    background-image: url("data:image/svg+xml;utf8,<svg fill='%23cbd5f5' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
}
[data-theme="dark"] .report-page select option,
[data-theme="dark"] .report-page select optgroup {
    background-color: #0f172a;
    color: #e5e7eb;
}
[data-theme="dark"] .report-page select option:checked {
    background-color: #1f2937;
    color: #e5e7eb;
}
[data-theme="dark"] .report-page select:disabled {
    background: #1a1f26 url("data:image/svg+xml;utf8,<svg fill='%23cbd5f5' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>") no-repeat right 0.75rem center;
    background-size: 1rem;
    border-color: #2c3340;
    color: #d7dde7;
    -webkit-text-fill-color: #d7dde7;
    opacity: 1;
}
[data-theme="dark"] .report-page input:focus,
[data-theme="dark"] .report-page select:focus,
[data-theme="dark"] .report-page textarea:focus {
    background-color: rgba(255,255,255,.04);
    box-shadow: 0 0 0 3px rgba(59,130,246,.2);
}

/* Textareas */
.report-page textarea {
    min-height: 80px;
    resize: vertical;
}

/* Botones principales */
.report-page .btn-primary,
.report-page .btn-secondary {
    min-height: 44px;
    font-size: 1rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    font-weight: 500;
    position: relative;
    overflow: hidden;
    transition: background-color 0.3s ease;
}
.report-page .btn-primary {
    background-color: var(--color-primary) !important;
    border: none !important;
    color: white !important;
}
.report-page .btn-primary:hover {
    background-color: var(--color-primary-dark) !important;
}
/* Bot�n cancelar outline azul */
.report-page .btn-secondary {
    background-color: #fff !important;
    border: 1px solid var(--color-primary) !important;
    color: var(--color-primary) !important;
    text-decoration: none !important;
    font-weight: 500;
}
.report-page .btn-secondary:hover {
    background-color: #f5f9ff !important;
}

/* Ripple effect */
.report-page .btn-primary::after, .report-page .btn-secondary::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    transform: scale(0);
    background: rgba(255, 255, 255, 0.4);
    transition: transform 0.5s, opacity 1s;
    pointer-events: none;
}
.report-page .btn-primary:active::after, .report-page .btn-secondary:active::after {
    transform: scale(4);
    opacity: 0;
    transition: 0s;
}

/* Bot�n GPS */
.report-page .btn-gps {
    background-color: var(--color-primary);
    border: none;
    color: white;
    padding: 0.65rem 1.2rem;
    font-size: 1rem;
    border-radius: var(--radius);
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-bottom: 0.5rem;
}
.report-page .btn-gps:hover {
    background-color: var(--color-primary-dark);
}

.report-page .gps-status:empty {
    display: none;
}

/* Input file oculto + bot�n custom */
.report-page input[type="file"] {
    display: none;
}
.report-page .file-upload-label {
    display: inline-block;
    background-color: var(--color-primary);
    color: #ffffff !important; ; /* Texto blanco */
    padding: 0.65rem 1.2rem;
    font-size: 1rem !important;
    border-radius: var(--radius);
    font-weight: 500 !important;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-decoration: none;
}
.report-page .file-upload-label:hover {
    background-color: var(--color-primary-dark);
}

/* GPS info */
.report-page .gps-status, .report-page #coordenadas-section {
    border-radius: var(--radius);
    background-color: #FAFAFA;
    border: 1px solid #E0E0E0;
    padding: 0.75rem;
}

/* Mapa */
.report-page #map {
    border-radius: var(--radius);
    border: 1px solid #E0E0E0;
    height: clamp(320px, 60vh, 520px);
}

/* Breakpoints */
@media (min-width: 768px) {
    .report-page .form-card {
        padding: 1.25rem;
    }
    .report-page .card-header {
        font-size: 1.1rem;
    }
}
@media (min-width: 1024px) {
    .report-page .form-card {
        padding: 1.5rem;
    }
    .report-page .form-header h1 {
        font-size: 1.5rem;
    }
}






/* Dashboard additions */
.dashboard { display: grid; gap: 16px; padding: 8px 16px; box-sizing: border-box; overflow-x: hidden; }
.hero-compact { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.filters { display:flex; gap:8px; flex-wrap:wrap; }
.filters--inline { display:flex; gap:8px; align-items:center; }
.hero-info-wrapper { display:flex; justify-content:center; width:100%; margin: 8px 0 12px; }
.hero-info-card { width: 100%; max-width: 100%; background: #f4f9ff; border: 1px solid #e1e8f0; border-radius: 10px; box-shadow: 0 2px 3px rgba(0, 0, 0, 0.04); padding: 16px; color: #334455; line-height: 1.5; box-sizing: border-box; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.hero-info-card:hover { transform: translateY(-1px); box-shadow: 0 6px 14px rgba(0, 0, 0, 0.06); border-color: #d5e2f0; }
.hero-info-card__title { margin: 0 0 8px; font-size: 1rem; font-weight: 600; color: #1e2a38; letter-spacing: 0.01em; text-align: left; }
.hero-info-card__body { margin: 0; font-size: 0.95rem; text-align: left; }
.hero-info-card__note { display: block; margin-top: 0.35rem; font-size: 0.85rem; color: #64748b; }
@media (min-width: 640px) {
  .hero-info-card { padding: 20px; }
  .hero-info-card__body { font-size: 1rem; }
}
[data-theme="dark"] .hero-info-card { background: rgba(18, 26, 36, 0.92); border-color: rgba(255, 255, 255, 0.08); color: #dce6f5; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35); }
[data-theme="dark"] .hero-info-card__title { color: #bcd7ff; }
[data-theme="dark"] .hero-info-card__note { color: #9fb3d1; }
.kpis { display:grid; grid-template-columns: repeat(2, 1fr); gap:12px; }
.kpi-card { background:#f8fafc; border:1px solid #e2e8f0; border-radius:8px; padding:12px; }
.kpi-label { font-size:0.9rem; color:#64748b; }
.kpi-value { font-size:1.4rem; font-weight:700; }
@media (max-width: 640px) {
  .kpis[data-active-range] .kpi-card { display: none; }
  .kpis[data-active-range="all"] .kpi-card[data-range="all"],
  .kpis[data-active-range="today"] .kpi-card[data-range="today"],
  .kpis[data-active-range="7d"] .kpi-card[data-range="7d"],
  .kpis[data-active-range="30d"] .kpi-card[data-range="30d"] { display: block; }
}
.chart-grid { display:grid; gap:16px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); align-items: start; width: 100%; grid-auto-columns: 1fr; box-sizing: border-box; }
.chart-card { background:#fff; border:1px solid #e2e8f0; border-radius:8px; padding:12px; display:flex; flex-direction:column; box-sizing: border-box; width: 100%; max-width: 100%; }
.chart-card.full { grid-column: 1 / -1; }
.chart-card canvas { display:block; max-width:100%; height:auto; background:transparent; }

@media (min-width: 768px) {
  .kpis { grid-template-columns: repeat(4, 1fr); }
  .chart-grid { display:grid; gap:16px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); align-items: stretch; width: 100%; grid-auto-columns: 1fr; }
}
/* Legend styles */
.legend { background: rgba(255,255,255,.95); padding:8px; border:1px solid #e2e8f0; border-radius:6px; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.legend-title { font-weight:600; margin-bottom:6px; font-size:.9rem; }
.legend-item { display:flex; align-items:center; gap:8px; margin:4px 0; }
.legend-icon { width:20px; height:20px; }
.legend-swatch { width:12px; height:12px; border-radius:2px; display:inline-block; border:1px solid #0001; }
.legend-label { font-size:.9rem; }
/* Theme variables */
[data-theme="dark"] {
  --bg: #0b1220;
  --fg: #e5e7eb;
  --muted: #94a3b8;
  --card: #0f172a;
  --border: #1f2937;
  --brand: #3b82f6;
  --accent: #22c55e;
  --chip: #111827;
}

html, body { background: var(--bg); color: var(--fg); }
header, footer { background: var(--card); color: var(--fg); border-bottom: 1px solid var(--border); }

/* Utility helpers */
.u-flex { display:flex; }
.u-flex-center { display:flex; align-items:center; justify-content:center; }
.u-gap-2 { gap: var(--space-2); }
.u-gap-3 { gap: var(--space-3); }
.u-pad-2 { padding: var(--space-2); }
.u-pad-3 { padding: var(--space-3); }
.u-radius-sm { border-radius: var(--radius-sm); }
.u-radius-md { border-radius: var(--radius-md); }
.u-shadow-sm { box-shadow: var(--shadow-sm); }
.u-text-sm { font-size: var(--font-size-sm); line-height: var(--line-height-normal); }
.u-text-muted { color: var(--muted); }

/* Enhance KPIs and cards */
.kpi-card { background: var(--card); border:1px solid var(--border); border-radius:12px; padding:12px; transition: transform .12s ease, box-shadow .12s ease; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.kpi-card:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.08); }
.kpi-label { color: var(--muted); }
.kpi-value { color: var(--fg); }
.kpi-icon { width:28px; height:28px; display:flex; align-items:center; justify-content:center; margin-bottom:6px; color: var(--brand); }

/* Chips */
.chip {
  background: var(--chip);
  color: var(--fg);
  border:1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-3);
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  cursor: pointer;
  transition: background .12s ease, transform .08s ease, border-color .12s ease, color .12s ease;
  text-decoration: none;
}
.chip:hover { transform: translateY(-1px); }
.chip.is-active { background: var(--brand); color:#fff; border-color: var(--brand); }

/* Legend */
.legend { background: var(--card); border:1px solid var(--border); color: var(--fg); }
.legend-swatch { border-color: var(--border); }

/* Nearby */
.nearby { display: grid; gap: 10px; margin-top: 10px; }
.nearby-item { background: var(--card); border:1px solid var(--border); border-radius: 10px; padding: 10px 12px; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.nearby-item:hover { box-shadow: 0 6px 16px rgba(0,0,0,.08); }
.nearby-row { display:flex; align-items:center; gap:10px; }
.nearby-emoji { font-size: 1.25rem; line-height: 1; }
.nearby-head { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.nearby-title { font-weight: 600; text-transform: capitalize; }
.nearby-meta { color: var(--muted); font-size: .9rem; }
.nearby-meta__item { display: inline-flex; align-items: center; gap: 4px; }
.nearby-meta__icon { font-size: .85rem; line-height: 1; opacity: .8; }
.nearby-meta__dot { margin: 0 6px; opacity: .6; }
.nearby-policy { margin-top: 6px; width: min(100%, 420px); }
.nearby-actions {
  margin-top: 10px;
  margin-bottom: 6px;
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}
.nearby-action {
  font-size: .78rem;
  padding: .25rem .7rem;
  border-radius: 999px;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
  display: inline-flex;
  align-items: center;
  gap: .25rem;
}
.nearby-action--detail { background: #2563eb; }
.nearby-action--detail:hover,
.nearby-action--detail:focus { background: #1d4ed8; }
.nearby-action--share { background: #25d366; }
.nearby-action--share:hover,
.nearby-action--share:focus { background: #1ebe5b; }

@media (min-width: 769px) {
  .nearby-item { display: block; }
  .nearby-head { flex-direction: column; align-items: flex-start; }
}

@media (min-width: 1024px) {
  .nearby { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nearby-item { height: 100%; }
}


@media (max-width: 768px) {
  .nearby-head { flex-direction: column; align-items: flex-start; }
  .nearby-meta { display: block; white-space: nowrap; }
  .nearby-policy { margin-top: 8px; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; }
}
/* Header/nav polish */
header { display:flex; align-items:center; justify-content:space-between; padding: 6px 12px; }
header .logo { height: 42px; width: auto; display: block; }
.site-nav { display:flex; align-items:center; gap: var(--space-2); }
.nav-links { display:flex; align-items:center; gap: 1.25rem; }
.nav-quick-report {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-pill);
  background: var(--brand);
  color: #fff;
  text-decoration: none;
  font-size: 0;
  line-height: 1;
  box-shadow: var(--shadow-sm);
}
.nav-quick-report::before {
  content: "+";
  display: block;
  font-size: 1.35rem;
  line-height: 1;
  transform: translateY(-1px);
}
.nav-quick-report.is-active {
  background: var(--border);
  color: var(--fg);
}
.nav-quick-report:hover { filter: brightness(1.05); }
.nav-quick-report:focus { outline: 2px solid rgba(37,99,235,.5); outline-offset: 2px; }
.nav-toggle {
  display:none;
  align-items:center;
  justify-content:center;
  width: 40px;
  height: 40px;
  padding: 0;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--color-primary);
  cursor: pointer;
}
.nav-toggle:hover { background: rgba(25,118,210,.08); }
.nav-toggle:focus { outline: 2px solid rgba(25,118,210,.5); outline-offset: 2px; }
.nav-toggle__icon { font-size: 1.5rem; line-height: 1; }
[data-theme="dark"] .nav-toggle { color: var(--brand); }
header nav a { color: var(--fg); text-decoration: none; font-weight: 600; }
header nav a:hover { opacity:.8; }
header nav a.button { color:#fff !important; }
.nav-links a:not(.button):not(.button-outline) {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 var(--space-2);
  border-radius: var(--radius-sm);
}
.site-nav .button,
.site-nav .button-outline {
  min-height: 34px;
  padding: 0.45rem 0.9rem;
  box-shadow: var(--shadow-sm);
}
.nav-links a:not(.button):not(.button-outline):hover {
  background: rgba(37,99,235,.08);
}
[data-theme="dark"] .nav-links a:not(.button):not(.button-outline):hover {
  background: rgba(59,130,246,.18);
}
.filters--inline { display:flex; gap:8px; align-items:center; }

/* Responsive refinements */
@media (max-width: 768px) {
  .dashboard { padding: 8px 16px; gap: 12px; }
  .hero-compact { flex-direction: column; align-items: flex-start; gap: 8px; }
  .filters--inline { width: 100%; flex-wrap: wrap; justify-content: flex-start; gap:4px; }
  .filters--inline .chip { padding: 6px 9px; min-height: 32px; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .chart-grid { display:grid; gap:16px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); align-items: stretch; width: 100%; grid-auto-columns: 1fr; }
  .chart-card { padding: 10px; }
  .map { height: 320px; }
  .map-toolbar { flex-direction: column; align-items: flex-start; gap: 6px; }
  .nearby { gap: 6px; }
}

@media (max-width: 480px) {
  .kpis { grid-template-columns: 1fr; }
  .filters--inline { overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; gap:4px; flex-wrap: nowrap; }
  .filters--inline .chip { display: inline-flex; margin-right: 0; padding: 4px 7px; min-height: 28px; font-size:.88rem; }
  .map { height: 260px; }
  header nav a { font-size: 0.95rem; }
}
@media (max-width: 360px) {
  .filters--inline { gap: 4px; }
  .filters--inline .chip { padding: 4px 7px; min-height: 28px; font-size: .86rem; }
  .map-infobar .range-chips { gap: 4px; }
  .map-infobar .range-chips .chip { padding: 3px 6px; height: 28px; font-size: .78rem; white-space: nowrap; }
  .dashboard--map .nearby-meta { font-size: .78rem; }
}
@media (max-width: 330px) {
  .filters--inline { flex-wrap: wrap; white-space: normal; overflow-x: visible; }
}
@media (max-width: 640px){
  .dashboard { display:flex; flex-direction: column; gap: 12px; }
  .kpis { grid-template-columns: 1fr; }
  .map-section { order: 3; }
  .charts-wrap { order: 4; }
  /* Extra breathing room between logo and nav on mobile */
  header { flex-direction: row; align-items: center; gap: 12px; padding: 12px 14px; }
  header .brand { margin: 0; }
  header .logo { height: 36px; }
  .site-nav { width: auto; flex-direction: row; align-items: center; gap: var(--space-2); position: relative; }
  .nav-quick-report { display: flex; }
.nav-toggle { display:flex; align-self: center; }
  .nav-links {
    display:flex;
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-2);
    width: min(240px, 92vw);
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: var(--space-2);
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    visibility: hidden;
    transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
    z-index: 600;
  }
  .nav-links.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    visibility: visible;
  }
  .nav-links a, .nav-links .button, .nav-links .button-outline { width: 100%; justify-content: center; }
  .nav-links a:not(.button):not(.button-outline) {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    min-height: 36px;
    padding: 0.5rem 0.9rem;
    box-shadow: var(--shadow-sm);
  }
  .nav-links .button,
  .nav-links .button-outline {
    min-height: 36px;
    padding: 0.5rem 0.9rem;
    box-shadow: var(--shadow-sm);
  }
}

/* Override chart cards to follow theme */
.chart-card { background: var(--card) !important; border: 1px solid var(--border) !important; }
.chart-card canvas { display:block; max-width:100%; height:auto; background:transparent; }

.chart-grid--primary .chart-card { min-height: 340px; }
.chart-grid--trends .chart-card { min-height: unset; }
@media (max-width: 768px){ .chart-card h3{ font-size:1rem; } }

.chart-grid.chart-grid--trends {
  grid-template-columns: 1fr;
  gap: 16px;
  width: 100%;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}
@media (min-width: 768px) {
  .chart-grid.chart-grid--trends {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }
  .chart-grid.chart-grid--trends > .chart-card.full { grid-column: 1 / -1; }
}

.chart-grid .chart-card { width: 100%; }/* las tarjetas ocupan su columna completa */
.container-7xl { max-width: 100%; margin-left:auto; margin-right:auto; padding-left:1rem; padding-right:1rem; }
@media (min-width: 640px){ .container-7xl { padding-left:1.5rem; padding-right:1.5rem; } }
@media (min-width: 1024px){ .container-7xl { padding-left:2rem; padding-right:2rem; } }
.charts-section { margin-top: 2rem; margin-bottom: 2rem; }
@media (min-width: 640px){ .charts-section { margin-top: 2.5rem; margin-bottom: 2.5rem; } }
.charts-section.container-7xl { padding-left: 0; padding-right: 0; }
.charts-grid { display: grid; gap: 1.5rem; }
@media (min-width: 640px){ .charts-grid { gap: 2rem; } }
.charts-row { display: grid; gap: 1.5rem; }
.charts-row.one-col { grid-template-columns: 1fr; }
.charts-row.two-cols { grid-template-columns: 1fr; }
@media (min-width: 768px){ .charts-row.two-cols { grid-template-columns: 1fr 1fr; } }
.chart-card-pro { background: var(--card); border:1px solid var(--border); border-radius: 0.75rem; padding: 1rem; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
@media (min-width: 640px){ .chart-card-pro { padding: 1.25rem; } }
.chart-aspect { position: relative; width: 100%; }
.chart-aspect.aspect-16-10 { padding-top: 62.5%; }
.chart-aspect.aspect-1-1 { padding-top: 100%; }
.chart-aspect.aspect-21-9 { padding-top: 42.857%; }
.chart-card--donut .chart-aspect { padding-top: 62.5% !important; position: relative; }
.donut-fit { position:absolute; top:0; bottom:0; left:50%; transform: translateX(-50%); height:100%; aspect-ratio: 1 / 1; width: auto; }
.donut-fit .chart-canvas { position:absolute; inset:0; width: 100% !important; height: 100% !important; }
.chart-canvas { position:absolute; inset:0; width:100% !important; height:100% !important; }
.chart-card-pro h3 { margin: 0 0 .5rem 0; font-size: 1.1rem; }
@media (min-width: 640px){ .chart-card-pro h3 { font-size: 1.25rem; } }
@media (max-width: 640px){
  .chart-card--donut .chart-aspect { padding-top: 78% !important; }
}

/* charts-wrap: padding sim?trico consistente con el resto del layout */
.charts-wrap { width: 100%; margin: 0; padding: 0 !important; box-sizing: border-box; }
@media (min-width: 640px){ .charts-wrap { padding: 0 !important; } }
@media (min-width: 1024px){ .charts-wrap { padding: 0 !important; } }

/* Map usability quick wins (scoped) */
.map-section { display:grid; gap:8px; }
.map-section .map-wrap { position: relative; padding: 8px; box-sizing: border-box; }
@media (min-width: 768px){ .map-section .map-wrap { padding: 12px; } }
.map-stage { position: relative; }
.map-section .map { width: 100%; border-radius: 10px; overflow: hidden; height: 420px; }
/* Taller map variant for better vertical space */
.map-section .map.map--tall { height: 630px; }
@media (min-width: 1280px){ .map-section .map.map--tall { height: 720px; } }
@media (max-width: 768px){ .map-section .map.map--tall { height: 432px; } }
@media (max-width: 640px){
  .map-section .map { height: 520px; }
  .map-section .map.map--tall { height: 544px; }
}
.map-toolbar { display:flex; align-items:center; justify-content:space-between; gap:8px; flex-wrap: wrap; }
.map-toolbar--overlay {
  position:absolute;
  top:10px;
  left:10px;
  right:10px;
  z-index: 405;
  background: var(--card);
  border:1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,.10);
  backdrop-filter: blur(6px);
}
.map-stage { padding-top: 64px; }
@media (max-width: 768px){ .map-stage { padding-top: 160px; } }
@media (max-width: 420px){ .map-stage { padding-top: 190px; } }
.map-toolbar h3 { margin: 0; font-size: 1.25rem; }
.map-tools { display:flex; align-items:center; gap:8px; flex-wrap: wrap; }
.segmented { display:inline-flex; border:1px solid var(--border); border-radius: 999px; overflow: hidden; background: var(--chip); }
.segmented .seg-btn { appearance:none; background: transparent; border: none; padding: 6px 12px; color: var(--fg); cursor:pointer; font-size: .95rem; display:flex; align-items:center; gap:6px; }
.segmented .seg-btn.is-active { background: var(--brand); color:#fff; }
.segmented .seg-btn:focus { outline: 2px solid rgba(37,99,235,.5); outline-offset: -2px; }
.segmented .seg-btn[disabled] { opacity:.5; cursor:not-allowed; }

/* Iconos de segmento */
.map-tools .select { height: 36px; padding: 4px 8px; border:1px solid var(--border); border-radius: 8px; background: var(--card); color: var(--fg); width:auto; min-width: 88px; display:inline-block; }
.map-tools .map-row { display:flex; align-items:center; gap:8px; }
.map-tools .map-row--nearby .chip { flex: 0 0 auto; }
.map-tools .map-row--nearby .select { flex: 0 0 auto; min-width: 120px; }
.map-tools .map-row--center .chip { width: auto; justify-content: center; }
.map-tools .chip { height: 36px; padding: 4px 10px; display:inline-flex; align-items:center; gap:6px; }
.map-tools .seg-icon,
.map-tools .btn-ico { font-size: 1rem; line-height: 1; }
.map-tools .seg-icon--img {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.map-tools .seg-icon--img img {
  width: 18px;
  height: 18px;
  display: block;
  object-fit: contain;
}
@media (max-width: 768px){
  .map-tools { flex-direction: column; align-items: stretch; }
  .map-tools .map-row { width: 100%; }
  .map-tools .map-row--segment .segmented { width: 100%; }
  .map-tools .map-row--segment .seg-btn { flex: 1 1 0; justify-content: center; }
  .map-tools .map-row--nearby { flex-wrap: nowrap; }
  .map-tools .map-row--nearby .chip { flex: 1 1 auto; }
  .map-tools .map-row--center .chip { width: 100%; }
}
@media (max-width: 420px){
  .map-tools .map-row--nearby { flex-wrap: wrap; }
  .map-tools .map-row--nearby .select { width: 100%; min-width: 0; }
}
/* Empuja los controles nativos por debajo de la barra */
.map-section .leaflet-top .leaflet-control { margin-top: 130px; }
.map-section .leaflet-control,
.report-page .leaflet-control {
  background: var(--card);
  border:1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(0,0,0,.08);
}
.map-section .leaflet-control a,
.report-page .leaflet-control a {
  background-color: var(--card);
  color: var(--fg);
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}
.map-section .leaflet-control a:hover,
.map-section .leaflet-control a:focus,
.report-page .leaflet-control a:hover,
.report-page .leaflet-control a:focus {
  background-color: rgba(59,130,246,.12);
  color: var(--fg);
}
.map-section .leaflet-control a.leaflet-disabled,
.report-page .leaflet-control a.leaflet-disabled {
  background-color: var(--card);
  color: var(--muted);
}
/* Keep popups above floating map UI */
.map-section .leaflet-popup-pane {
  z-index: 1100 !important;
}

/* Focus popup: hide floating map UI so it never covers the popup */
.map-section.is-popup-open .map-toolbar--overlay,
.map-section.is-popup-open .map-infobar,
.map-section.is-popup-open .map-chip--view,
.map-section.is-popup-open .map-scroll-hint,
.map-section.is-popup-open .map-flash-stack,
.map-section.is-popup-open .map-toast,
.map-section.is-popup-open .leaflet-control-container {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Emoji marker pin */
.emoji-pin .ep { width: 28px; height: 28px; border-radius: 50%; background: #fff; display:flex; align-items:center; justify-content:center; border:1px solid var(--border); box-shadow: 0 2px 6px rgba(0,0,0,.12); }
.emoji-pin .ep span { font-size: 16px; line-height: 1; }
/* Species color accents */
.emoji-pin.ep--whale .ep { border-color:#0ea5e9; box-shadow: 0 0 0 2px rgba(14,165,233,.16), 0 2px 6px rgba(0,0,0,.12); }
.emoji-pin.ep--orca .ep { border-color:#111827; box-shadow: 0 0 0 2px rgba(17,24,39,.16), 0 2px 6px rgba(0,0,0,.12); }
.emoji-pin.ep--dolphin .ep { border-color:#06b6d4; box-shadow: 0 0 0 2px rgba(6,182,212,.16), 0 2px 6px rgba(0,0,0,.12); }
.emoji-pin.ep--dolphin-a .ep { border-color:#3b82f6; box-shadow: 0 0 0 2px rgba(59,130,246,.16), 0 2px 6px rgba(0,0,0,.12); }
.emoji-pin.ep--seal .ep { border-color:#64748b; box-shadow: 0 0 0 2px rgba(100,116,139,.16), 0 2px 6px rgba(0,0,0,.12); }
.emoji-pin.ep--penguin .ep { border-color:#f59e0b; box-shadow: 0 0 0 2px rgba(245,158,11,.16), 0 2px 6px rgba(0,0,0,.12); }
.emoji-pin.ep--turtle .ep { border-color:#22c55e; box-shadow: 0 0 0 2px rgba(34,197,94,.16), 0 2px 6px rgba(0,0,0,.12); }
.emoji-pin.ep--shark .ep { border-color:#0f766e; box-shadow: 0 0 0 2px rgba(15,118,110,.16), 0 2px 6px rgba(0,0,0,.12); }
.emoji-pin.ep--unknown .ep { border-color:#9ca3af; box-shadow: 0 0 0 2px rgba(156,163,175,.16), 0 2px 6px rgba(0,0,0,.12); }

/* Floating chips: view + range */
.map-stage .map-chip { position: absolute; z-index: 400; background: var(--chip); color: var(--fg); border:1px solid var(--border); border-radius: 8px; padding: 6px 10px; font-size: .85rem; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.map-stage .map-chip--view { top: 12px; right: 16px; }

/* Empty-state overlay */
.map-stage .map-empty { position: absolute; inset: 8px; display: grid; place-items: center; z-index: 1200; pointer-events: none; }
.map-stage .map-empty__card { background: var(--card); color: var(--fg); border:1px solid var(--border); border-radius: 10px; padding: 14px 16px; box-shadow: 0 6px 20px rgba(0,0,0,.12); text-align: center; pointer-events: auto; }
.map-empty__title { margin-bottom: 8px; font-weight: 600; }
.map-empty[hidden] { display: none !important; }


/* Map info bar under the map for mobile-friendly status */
.map-infobar { display:flex; align-items:center; gap:12px; padding: 8px 10px; background: var(--card); border:1px solid var(--border); border-top: none; border-radius: 0 0 10px 10px; box-shadow: 0 2px 6px rgba(0,0,0,.04) inset; }
.map-infobar .infobar-spacer { flex:1 1 auto; }
.map-infobar .map-chip { position: static; border-radius: 999px; padding: 6px 10px; }
.map-infobar .infobar-status { color: var(--muted); font-size: .9rem; }
/* Range chips inside infobar */
.map-infobar .infobar-label { color: var(--muted); font-size: .9rem; margin-right: 6px; }
.map-infobar .range-chips { display: inline-flex; gap: 6px; }
.map-infobar .range-chips .chip { padding: 4px 10px; height: 32px; }
@media (max-width: 768px){
  .map-infobar { flex-wrap: wrap; gap:8px; }
  .map-infobar .infobar-spacer { display:none; }
}
@media (max-width: 640px){
  .map-infobar .infobar-label { display: none; }
}

/* Home map background layout */
.dashboard--map {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  overflow: visible;
  --map-overlap: clamp(120px, 14vh, 200px);
  margin-top: -2rem;
}
@media (max-width: 768px){
  .dashboard--map { --map-overlap: clamp(150px, 18vh, 230px); }
}
@supports (height: 100svh){
  @media (max-width: 768px){
    .dashboard--map { --map-overlap: clamp(160px, 20svh, 240px); }
  }
}
.dashboard--map .dashboard-content {
  order: 0;
  position: relative;
  z-index: 2;
  margin-top: calc(var(--map-overlap) * -1);
  display: grid;
  gap: 16px;
  padding: 8px 16px;
  isolation: isolate;
}
.dashboard--map .dashboard-content::before {
  content: "";
  position: absolute;
  top: var(--map-overlap);
  bottom: 0;
  left: calc(50% - 50vw);
  width: 100vw;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(248,250,252,.92) 0%, rgba(248,250,252,.82) 40%, rgba(248,250,252,.72) 100%);
  backdrop-filter: blur(6px) saturate(0.9);
}
.dashboard--map .dashboard-content > * {
  position: relative;
  z-index: 1;
}
.dashboard--map .map-section {
  order: -1;
  position: sticky;
  top: 0;
  height: 100vh;
  min-height: 100vh;
  z-index: 0;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}
@supports (height: 100svh){
  .dashboard--map .map-section { height: 100svh; min-height: 100svh; }
}
@supports (height: 100dvh){
  .dashboard--map .map-section { height: 100dvh; min-height: 100dvh; }
}
.dashboard--map .map-wrap {
  height: 100%;
  width: 100%;
  padding: 0;
}
.dashboard--map .map-stage {
  height: 100%;
  padding-top: 0;
}
.dashboard--map .map-scroll-hint{
  position:absolute;
  left:50%;
  bottom: var(--map-scroll-hint-bottom, calc(var(--map-overlap) + 76px));
  transform: translateX(-50%);
  display:flex;
  align-items:center;
  justify-content:center;
  gap:0;
  width:40px;
  height:40px;
  padding:0;
  border-radius:999px;
  border: 0;
  background: #16a34a;
  color:#ffffff;
  font-size:.9rem;
  letter-spacing:.01em;
  box-shadow:0 12px 26px rgba(22,163,74,.35);
  opacity:.9;
  cursor:pointer;
  pointer-events:auto;
  transition: opacity .2s ease, transform .2s ease, box-shadow .2s ease, background .2s ease;
  z-index: 405;
  appearance: none;
  font: inherit;
  line-height: 1;
  --map-scroll-hint-icon-offset: 4px;
}
.dashboard--map .map-scroll-hint__icon{
  width:18px;
  height:18px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  line-height: 1;
}
.dashboard--map .map-scroll-hint__icon svg{
  width:18px;
  height:18px;
  display:block;
  stroke:currentColor;
  stroke-width:2.2;
  fill:none;
  stroke-linecap:round;
  stroke-linejoin:round;
  transform: translateY(var(--map-scroll-hint-icon-offset, 0px));
}
.dashboard--map .map-scroll-hint:hover{
  opacity:1;
  background: #15803d;
  box-shadow:0 16px 30px rgba(22,163,74,.45);
  transform: translateX(-50%) translateY(-2px);
}
.dashboard--map .map-scroll-hint.is-hidden{
  opacity:0;
  pointer-events:none;
  transform: translateX(-50%) translateY(6px);
}
.dashboard--map .map-section .map,
.dashboard--map .map-section .map.map--tall {
  height: 100%;
  border-radius: 0;
}
.dashboard--map .map-section .leaflet-top .leaflet-control {
  margin-top: 12px;
}

/* Dark theme overrides for map layout */
[data-theme="dark"] .dashboard--map .dashboard-content::before {
  background: linear-gradient(180deg, rgba(10,15,24,.92) 0%, rgba(10,15,24,.82) 40%, rgba(10,15,24,.72) 100%);
}
[data-theme="dark"] .dashboard--map .map-infobar {
  background: rgba(10,15,24,.6);
  border-color: rgba(148,163,184,.18);
  box-shadow: 0 8px 24px rgba(2,6,23,.45);
}
[data-theme="dark"] .dashboard--map .map-infobar-toggle {
  background: rgba(10,15,24,.5);
  border-color: rgba(148,163,184,.18);
  box-shadow: none;
}
[data-theme="dark"] .dashboard--map .map-tools {
  background: rgba(10,15,24,.6);
  border-color: rgba(148,163,184,.18);
  box-shadow: 0 8px 24px rgba(2,6,23,.45);
}
[data-theme="dark"] .dashboard--map .map-tools-toggle {
  background: rgba(10,15,24,.5);
  border-color: rgba(148,163,184,.18);
  box-shadow: none;
}
.dashboard--map .map-toast {
  position: absolute;
  left: 50%;
  bottom: calc(var(--map-overlap) + 104px);
  transform: translateX(-50%);
  background: rgba(15,23,42,.78);
  color: #f8fafc;
  border: 1px solid rgba(148,163,184,.35);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: .85rem;
  letter-spacing: .01em;
  box-shadow: 0 8px 20px rgba(15,23,42,.25);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .2s ease, visibility .2s ease;
  z-index: 900;
  white-space: nowrap;
}
.dashboard--map .map-toast.is-visible {
  opacity: 1;
  visibility: visible;
}
@media (max-width: 768px) {
  .dashboard--map .map-toast { bottom: calc(var(--map-overlap) + 96px); }
}

/* Map toolbar overlay */
.dashboard--map .map-toolbar--overlay {
  --map-toggle-width: 24px;
  --map-toggle-height: 24px;
  --map-toggle-gap: 0px;
  top: 16px;
  right: 16px;
  left: auto;
  bottom: auto;
  width: auto;
  max-width: 240px;
  padding: 0;
  z-index: 1005;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
}
.dashboard--map .map-toolbar--overlay.is-collapsed .map-tools {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Map tools toggle */
.dashboard--map .map-tools-toggle {
  position: absolute;
  top: 50%;
  left: calc(-1 * (var(--map-toggle-width, 24px) + var(--map-toggle-gap, 0px)));
  width: var(--map-toggle-width, 24px);
  height: var(--map-toggle-height, 24px);
  border-radius: 8px 0 0 8px;
  border: 1px solid rgba(148,163,184,.4);
  border-left: 0;
  background: rgba(255,255,255,.5);
  color: var(--fg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  backdrop-filter: blur(6px);
  cursor: pointer;
  transform: translateY(-50%);
}
.dashboard--map .map-tools-toggle__icon {
  font-size: 14px;
  line-height: 1;
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: rotate(180deg);
}
.dashboard--map .map-toolbar--overlay.is-collapsed .map-tools-toggle__icon {
  transform: rotate(0deg);
}
.dashboard--map .map-toolbar--overlay.is-collapsed .map-tools-toggle {
  left: auto;
  right: 8px;
  width: var(--map-toggle-width, 24px);
  height: var(--map-toggle-height, 24px);
  border-radius: 0 8px 8px 0;
  border-left: 1px solid rgba(148,163,184,.4);
  border-right: 0;
}

/* Map tools panel */
.dashboard--map .map-tools {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  background: rgba(255,255,255,.6);
  border: 1px solid rgba(148,163,184,.4);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(15,23,42,.18);
  backdrop-filter: blur(8px);
  padding: 10px;
}
.dashboard--map .map-tools .segmented { width: 100%; justify-content: space-between; }
.dashboard--map .map-tools .seg-btn { justify-content: center; flex: 1 1 auto; }
.dashboard--map .map-tools .map-row,
.dashboard--map .map-tools .select,
.dashboard--map .map-tools .chip { width: 100%; }
.dashboard--map .map-tools .map-row { flex-direction: column; align-items: stretch; }
.dashboard--map .seg-label,
.dashboard--map .btn-label { display: none; }
.dashboard--map .map-tools .seg-btn,
.dashboard--map .map-tools .chip { justify-content: center; }
.dashboard--map .map-tools .select { text-align: center; }
.dashboard--map .map-chip--view { display: none; }
.dashboard--map .hero-compact {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  padding: 12px 14px;
}

/* Nearby list under map */
.dashboard--map #nearby-list {
  margin-top: 8px;
}
.dashboard--map #nearby-list:empty { display: none; }

/* Map infobar */
.dashboard--map .map-infobar {
  position: absolute;
  left: 16px;
  right: 16px;
  z-index: 410;
  --map-toggle-width: 24px;
  --map-toggle-height: 24px;
  --map-toggle-gap: 0px;
  bottom: calc(var(--map-overlap) + 12px);
  background: rgba(255,255,255,.6);
  border: 1px solid rgba(148,163,184,.4);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(15,23,42,.18);
  backdrop-filter: blur(8px);
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px;
  max-width: none;
  width: auto;
}
.dashboard--map .map-infobar.is-collapsed {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  backdrop-filter: none;
}
.dashboard--map .map-infobar.is-collapsed .infobar-range,
.dashboard--map .map-infobar.is-collapsed .infobar-status,
.dashboard--map .map-infobar.is-collapsed .infobar-spacer,
.dashboard--map .map-infobar.is-collapsed .infobar-label { display: none; }
.dashboard--map .map-infobar-toggle {
  position: absolute;
  top: calc(-1 * (var(--map-toggle-height, 24px) + var(--map-toggle-gap, 0px)));
  left: 50%;
  width: var(--map-toggle-width, 24px);
  height: var(--map-toggle-height, 24px);
  border-radius: 8px 8px 0 0;
  border: 1px solid rgba(148,163,184,.4);
  border-top: 0;
  background: rgba(255,255,255,.5);
  color: var(--fg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  backdrop-filter: blur(6px);
  cursor: pointer;
  transform: translateX(-50%);
}
.dashboard--map .map-infobar.is-collapsed .map-infobar-toggle {
  top: auto;
  bottom: calc(-1 * (var(--map-toggle-height, 24px) + var(--map-toggle-gap, 0px)) + 24px);
  left: 50%;
  border-radius: 0 0 8px 8px;
  border-top: 1px solid rgba(148,163,184,.4);
  border-bottom: 0;
  transform: translateX(-50%);
}
.dashboard--map .map-infobar-toggle__icon {
  font-size: 14px;
  line-height: 1;
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: rotate(-90deg) translateX(-1px);
}
.dashboard--map .map-infobar.is-collapsed .map-infobar-toggle__icon {
  transform: rotate(90deg) translateX(-1px);
}
.dashboard--map .map-infobar .infobar-spacer,
.dashboard--map .map-infobar .infobar-label { display: none; }
.dashboard--map .map-infobar .infobar-range {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  justify-content: center;
}
.dashboard--map .map-infobar .range-chips {
  flex-wrap: nowrap;
  width: 100%;
  justify-content: center;
  max-width: none;
  margin: 0;
}
.dashboard--map .map-infobar .range-chips .chip {
  flex: 1 1 0;
  min-width: 0;
  padding: 4px 6px;
  text-align: center;
  white-space: nowrap;
}
.dashboard--map .map-infobar .infobar-status {
  text-align: center;
  font-size: .85rem;
  max-width: 100%;
}
@media (max-width: 768px) {
  .dashboard--map .dashboard-content { gap: 12px; }
  .dashboard--map .map-infobar { bottom: calc(var(--map-overlap) + 10px); }
}
@media (min-width: 1024px) {
  .dashboard--map { --map-overlap: clamp(180px, 16vh, 260px); }
  .dashboard--map .map-infobar {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: clamp(520px, 55vw, 720px);
    --infobar-height: 50px;
    min-height: var(--infobar-height);
  }
  .dashboard--map .map-infobar.is-collapsed {
    height: var(--infobar-height);
  }
}

/* Fullscreen map controls (floating layout) */
.leaflet-container.leaflet-fullscreen-on .leaflet-top .leaflet-control,
.leaflet-container.leaflet-pseudo-fullscreen .leaflet-top .leaflet-control,
.leaflet-fullscreen-on .leaflet-top .leaflet-control,
.leaflet-pseudo-fullscreen .leaflet-top .leaflet-control,
.map-fullscreen-ui .leaflet-top .leaflet-control { margin-top: 12px; }

/* Fullscreen toolbar */
.leaflet-fullscreen-on .map-toolbar--overlay,
.leaflet-pseudo-fullscreen .map-toolbar--overlay,
.map-fullscreen-ui .map-toolbar--overlay {
  top: 12px;
  right: 12px;
  left: auto;
  bottom: auto;
  width: auto;
  max-width: 240px;
  padding: 0;
  z-index: 1005;
}
.leaflet-fullscreen-on .map-toolbar--overlay h3,
.leaflet-pseudo-fullscreen .map-toolbar--overlay h3,
.map-fullscreen-ui .map-toolbar--overlay h3 { display: none; }

/* Fullscreen map tools */
.leaflet-fullscreen-on .map-tools,
.leaflet-pseudo-fullscreen .map-tools,
.map-fullscreen-ui .map-tools {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}
.leaflet-fullscreen-on .map-tools .segmented,
.leaflet-pseudo-fullscreen .map-tools .segmented,
.map-fullscreen-ui .map-tools .segmented { width: 100%; justify-content: space-between; }
.leaflet-fullscreen-on .map-tools .seg-btn,
.leaflet-pseudo-fullscreen .map-tools .seg-btn,
.map-fullscreen-ui .map-tools .seg-btn { justify-content: center; flex: 1 1 auto; }
.leaflet-fullscreen-on .map-tools .map-row,
.leaflet-fullscreen-on .map-tools .select,
.leaflet-fullscreen-on .map-tools .chip,
.leaflet-pseudo-fullscreen .map-tools .map-row,
.leaflet-pseudo-fullscreen .map-tools .select,
.leaflet-pseudo-fullscreen .map-tools .chip,
.map-fullscreen-ui .map-tools .map-row,
.map-fullscreen-ui .map-tools .select,
.map-fullscreen-ui .map-tools .chip { width: 100%; }
.leaflet-fullscreen-on .map-tools .map-row,
.leaflet-pseudo-fullscreen .map-tools .map-row,
.map-fullscreen-ui .map-tools .map-row { flex-direction: column; align-items: stretch; }
.leaflet-fullscreen-on .seg-label,
.leaflet-fullscreen-on .btn-label,
.leaflet-pseudo-fullscreen .seg-label,
.leaflet-pseudo-fullscreen .btn-label,
.map-fullscreen-ui .seg-label,
.map-fullscreen-ui .btn-label { display: none; }
.leaflet-fullscreen-on .map-tools .seg-btn,
.leaflet-pseudo-fullscreen .map-tools .seg-btn,
.map-fullscreen-ui .map-tools .seg-btn,
.leaflet-fullscreen-on .map-tools .chip,
.leaflet-pseudo-fullscreen .map-tools .chip,
.map-fullscreen-ui .map-tools .chip { justify-content: center; }
.leaflet-fullscreen-on .map-tools .select,
.leaflet-pseudo-fullscreen .map-tools .select,
.map-fullscreen-ui .map-tools .select { text-align: center; }

/* Fullscreen infobar */
.leaflet-fullscreen-on .map-infobar,
.leaflet-pseudo-fullscreen .map-infobar,
.map-fullscreen-ui .map-infobar {
  display: flex;
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  transform: none;
  border-top: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  z-index: 1004;
  max-width: none;
  width: auto;
}
.leaflet-fullscreen-on .map-infobar .infobar-spacer,
.leaflet-pseudo-fullscreen .map-infobar .infobar-spacer,
.map-fullscreen-ui .map-infobar .infobar-spacer { display: none; }
.leaflet-fullscreen-on .map-infobar .infobar-label,
.leaflet-pseudo-fullscreen .map-infobar .infobar-label,
.map-fullscreen-ui .map-infobar .infobar-label { display: none; }
.leaflet-fullscreen-on .map-infobar .infobar-range,
.leaflet-pseudo-fullscreen .map-infobar .infobar-range,
.map-fullscreen-ui .map-infobar .infobar-range {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  justify-content: center;
}
.leaflet-fullscreen-on .map-infobar .range-chips,
.leaflet-pseudo-fullscreen .map-infobar .range-chips,
.map-fullscreen-ui .map-infobar .range-chips {
  flex-wrap: nowrap;
  width: 100%;
  justify-content: space-between;
}
.leaflet-fullscreen-on .map-infobar .range-chips .chip,
.leaflet-pseudo-fullscreen .map-infobar .range-chips .chip,
.map-fullscreen-ui .map-infobar .range-chips .chip {
  flex: 1 1 0;
  min-width: 0;
  padding: 4px 6px;
  text-align: center;
  white-space: nowrap;
}
.leaflet-fullscreen-on .map-infobar .infobar-status,
.leaflet-pseudo-fullscreen .map-infobar .infobar-status,
.map-fullscreen-ui .map-infobar .infobar-status {
  text-align: center;
  font-size: .85rem;
  max-width: 100%;
}

/* Fullscreen nearby list (hidden) */
.leaflet-fullscreen-on .nearby,
.leaflet-pseudo-fullscreen .nearby,
.map-fullscreen-ui .nearby {
  display: none;
  position: absolute;
  left: 12px;
  bottom: 80px;
  width: 90vw;
  max-width: 320px;
  max-height: 40vh;
  overflow: auto;
  margin: 0;
  z-index: 1003;
}







.site-footer .footer-links{display:flex;gap:1rem;flex-wrap:wrap;justify-content:center;margin-top:.5rem}
.site-footer .footer-links{font-size:.95rem;opacity:.9;border-top:1px solid rgba(0,0,0,.08);padding-top:.65rem;margin-top:.75rem}
.site-footer .footer-links a{color:inherit;text-decoration:none;border-bottom:1px dotted transparent;opacity:.9}
.site-footer .footer-links a:hover{border-bottom-color:currentColor;opacity:1;text-decoration:underline;text-underline-offset:2px}
[data-theme="dark"] .site-footer .footer-links{border-top-color:rgba(255,255,255,.08)}

/* Footer focus states */
.site-footer .social-link:focus,
.site-footer .footer-links a:focus,
.site-footer .contact-item:focus { outline:2px solid var(--color-primary); outline-offset:2px }

/* Footer CTA */
.footer-cta{width:100%;}
.footer-cta form{display:flex;flex-direction:column;gap:.6rem;align-items:center;background:rgba(25,118,210,.06);padding:1rem;border-radius:12px;border:1px solid rgba(25,118,210,.15)}
.footer-cta .cta-title{font-weight:600}
.footer-cta .cta-row{display:flex;gap:.5rem;align-items:center;width:100%;max-width:520px}
.footer-cta input[type="email"]{flex:1;border:1px solid rgba(0,0,0,.15);border-radius:999px;padding:.6rem .9rem;background:#fff;color:inherit}
.footer-cta button.btn{border-radius:999px}
.footer-subscribe-msg{margin-top:.6rem;font-size:.85rem;padding:.45rem .8rem;border-radius:999px;border:1px solid transparent;text-align:center}
.footer-subscribe-msg--ok{color:#1d4ed8;background:rgba(29,78,216,.08);border-color:rgba(29,78,216,.2)}
.footer-subscribe-msg--info{color:#334155;background:rgba(148,163,184,.15);border-color:rgba(148,163,184,.35)}
.footer-subscribe-msg--error{color:#b91c1c;background:rgba(220,38,38,.08);border-color:rgba(220,38,38,.25)}
@media(max-width:640px){.footer-cta .cta-row{flex-direction:column;align-items:stretch}.footer-cta .cta-row button.btn{width:100%}}
@media(max-width:640px){.footer-subscribe-msg{font-size:.8rem}}
[data-theme="dark"] .footer-cta form{background:rgba(255,255,255,.06);border-color:rgba(255,255,255,.12)}
[data-theme="dark"] .footer-cta input[type="email"]{background:#0e141a;border-color:rgba(255,255,255,.18);color:#e6eaef}

/* Footer grid */
.footer-grid{display:grid;grid-template-columns:repeat(auto-fit, minmax(200px, 1fr));gap:1rem;width:100%;text-align:center;justify-items:center;max-width:1100px;margin:0 auto;box-sizing:border-box}
.footer-col{min-width:0}
.footer-col .footer-heading{font-weight:700;margin-bottom:.5rem}
.footer-col ul{list-style:none;margin:0;padding:0;display:grid;gap:.35rem}
.footer-col a{color:inherit;text-decoration:none;opacity:.9;overflow-wrap:anywhere}
.footer-col a:hover{text-decoration:underline;text-underline-offset:2px;opacity:1}
/* Alinear la columna Social a la izquierda (no centrado) */
.footer-grid .footer-social{justify-content:flex-start}
.footer-grid .footer-social .social-link{margin-left:0}
@media(max-width:820px){.footer-grid{grid-template-columns:repeat(2,minmax(0,1fr));max-width:100%}}
@media(max-width:520px){.footer-grid{grid-template-columns:1fr}}



/* BlueSignal Story card */
.story-wrap { margin: 1.5rem 0; }
.story-card { display: flex; flex-direction: column; gap: 0.5rem; }
.story-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }

.story-title { margin: 0; font-size: 1.2rem; }

.story-text { margin: 0; font-size: 1rem; line-height: 1.45; color: var(--fg); }
@media (max-width: 640px){
  .story-head { justify-content: flex-start; }
}
@media (max-width: 480px){
  .story-card { align-items: flex-start; }
  .story-title { text-align: left; }
}

/* Flash notifications */
.flash-stack{width:min(1100px,100%);margin:12px auto 0;padding:0 16px;display:grid;gap:10px}
.flash{
  --flash-accent: #2563eb;
  --flash-accent-soft: #dbeafe;
  --flash-bg: #eff6ff;
  --flash-border: #bfdbfe;
  --flash-ink: #0f172a;
  position: relative;
  display:flex;
  align-items:flex-start;
  gap:12px;
  padding:12px 42px 12px 14px;
  border-radius:14px;
  border:1px solid var(--flash-border);
  border-left:4px solid var(--flash-accent);
  background:var(--flash-bg);
  color:var(--flash-ink);
  box-shadow:0 10px 24px rgba(15,23,42,.08);
}
.flash__icon{
  width:32px;
  height:32px;
  border-radius:10px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:.72rem;
  font-weight:700;
  letter-spacing:.04em;
  background:var(--flash-accent-soft);
  color:var(--flash-accent);
  flex:0 0 auto;
}
.flash__icon::before{content:"i"}
.flash__body{font-size:.95rem;line-height:1.45;font-weight:600;min-width:0}
.flash__close{
  position:absolute;
  top:8px;
  right:10px;
  width:26px;
  height:26px;
  border-radius:999px;
  border:0;
  background:transparent;
  color:var(--muted,#64748b);
  font-size:1.1rem;
  line-height:1;
  cursor:pointer;
}
.flash__close:hover{background:rgba(15,23,42,.06);color:var(--fg)}
.flash__close:focus-visible{outline:2px solid rgba(37,99,235,.35);outline-offset:2px}
.flash--floating{
  border-left:0;
  border-radius:18px;
  background:rgba(255,255,255,.92);
  border:1px solid rgba(148,163,184,.45);
  box-shadow:0 18px 40px rgba(15,23,42,.18);
  backdrop-filter: blur(10px);
}
.flash--floating .flash__icon{
  width:28px;
  height:28px;
  border-radius:999px;
  font-size:.7rem;
}
.map-flash-stack{
  position:absolute;
  left:50%;
  top:72px;
  transform:translateX(-50%);
  width:min(560px, 92%);
  display:grid;
  gap:10px;
  z-index:910;
  pointer-events:none;
}
.map-flash-stack .flash{pointer-events:auto}
.flash[data-tone="success"]{--flash-accent:#16a34a;--flash-accent-soft:#dcfce7;--flash-bg:#f0fdf4;--flash-border:#bbf7d0}
.flash[data-tone="warning"]{--flash-accent:#d97706;--flash-accent-soft:#ffedd5;--flash-bg:#fff7ed;--flash-border:#fed7aa}
.flash[data-tone="error"]{--flash-accent:#dc2626;--flash-accent-soft:#fee2e2;--flash-bg:#fef2f2;--flash-border:#fecaca}
.flash[data-tone="info"]{--flash-accent:#2563eb;--flash-accent-soft:#dbeafe;--flash-bg:#eff6ff;--flash-border:#bfdbfe}
.flash[data-tone="success"] .flash__icon::before{content:"OK"}
.flash[data-tone="warning"] .flash__icon::before{content:"!"}
.flash[data-tone="error"] .flash__icon::before{content:"X"}
.flash[data-tone="info"] .flash__icon::before{content:"i"}
@media(max-width:480px){
  .flash{padding:10px 38px 10px 12px}
  .flash__icon{width:28px;height:28px;border-radius:9px}
  .flash__close{top:6px;right:8px}
}
[data-theme="dark"] .flash{--flash-ink:#e2e8f0;box-shadow:0 12px 28px rgba(2,6,23,.45)}
[data-theme="dark"] .flash[data-tone="info"]{--flash-accent:#60a5fa;--flash-accent-soft:rgba(59,130,246,.25);--flash-bg:rgba(30,58,138,.35);--flash-border:rgba(59,130,246,.4)}
[data-theme="dark"] .flash[data-tone="success"]{--flash-accent:#22c55e;--flash-accent-soft:rgba(34,197,94,.25);--flash-bg:rgba(22,163,74,.18);--flash-border:rgba(34,197,94,.35)}
[data-theme="dark"] .flash[data-tone="warning"]{--flash-accent:#f59e0b;--flash-accent-soft:rgba(245,158,11,.25);--flash-bg:rgba(245,158,11,.16);--flash-border:rgba(245,158,11,.35)}
[data-theme="dark"] .flash[data-tone="error"]{--flash-accent:#ef4444;--flash-accent-soft:rgba(239,68,68,.25);--flash-bg:rgba(239,68,68,.18);--flash-border:rgba(239,68,68,.35)}
[data-theme="dark"] .flash--floating{background:rgba(15,23,42,.82);border-color:rgba(148,163,184,.4)}
[data-theme="dark"] .flash__close:hover{background:rgba(148,163,184,.2)}
@media (max-width: 768px){
  .map-flash-stack{top:170px}
}
@media (max-width: 420px){
  .map-flash-stack{top:200px}
}

/* Pages */
.page-wrap{max-width:1100px;margin:1.5rem auto;padding:0 1rem;display:flex;flex-direction:column;gap:1rem}
.page-hero h2{margin:0;font-size:1.6rem}
.page-hero p{margin:0;color:var(--muted,#64748b)}
.emoji{font-family:"Segoe UI Emoji","Apple Color Emoji","Noto Color Emoji","Twemoji Mozilla",sans-serif;font-size:1.1em;vertical-align:middle}
.page-grid{display:grid;grid-template-columns:1fr;gap:1rem}
@media(min-width:768px){.page-grid{grid-template-columns:repeat(2,1fr)}}
.page-stack{display:flex;flex-direction:column;gap:1.25rem;width:100%}
.section-block{width:100%;background:var(--card);border:1px solid var(--border);border-radius:12px;padding:1.25rem 1.5rem;box-shadow:0 1px 3px rgba(0,0,0,.05)}
.section-block h3{margin:0 0 .35rem 0;font-size:1.3rem;display:flex;align-items:center;gap:.4rem}
.section-block h4{margin:.75rem 0 .35rem;font-size:1.05rem;color:var(--muted,#64748b)}
.section-block p{margin:.35rem 0;line-height:1.6}
.section-block ul,.section-block ol{margin:.35rem 0 .25rem 1.1rem;line-height:1.5;display:grid;gap:.35rem}
.section-block ol{padding-left:1.1rem}
.section-block ul{padding-left:1.05rem}
.section-head{display:flex;align-items:flex-start;gap:.75rem;margin-bottom:.35rem}
.section-icon{display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;border-radius:12px;background:rgba(37,99,235,.08);color:var(--brand,#2563eb);font-size:1.1rem}
[data-theme="dark"] .section-icon{background:rgba(59,130,246,.14);color:var(--brand,#3b82f6)}
.section-eyebrow{margin:0;font-size:.85rem;letter-spacing:.02em;text-transform:uppercase;color:var(--muted,#64748b)}
.section-lead{margin:.2rem 0 .4rem;font-weight:600;line-height:1.55}
.resource-stack .id-grid{display:grid;gap:1rem}
@media(min-width:720px){.resource-stack .id-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
.faq-grid{display:grid;gap:.75rem;margin-top:.4rem}
@media(min-width:720px){.faq-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
.faq-item{border:1px solid var(--border);border-radius:10px;padding:.85rem .95rem;background:rgba(0,0,0,.02);box-shadow:0 1px 2px rgba(0,0,0,.03)}
[data-theme="dark"] .faq-item{background:rgba(255,255,255,.03)}
.faq-q{margin:0 0 .15rem;font-weight:700}
.faq-a{margin:0;line-height:1.55}
.btn-link{color:var(--color-primary,#2563eb);text-decoration:none;font-weight:600}
.btn-link:hover{text-decoration:underline}
.badge.subtle{display:inline-block;padding:.25rem .5rem;border:1px solid var(--border);border-radius:999px;font-size:.9rem;color:var(--muted,#64748b)}
.method-block{margin:1rem 0;padding:1rem 1.1rem;border:1px solid var(--border);border-radius:12px;background:rgba(0,0,0,.02)}
[data-theme="dark"] .method-block{background:rgba(255,255,255,.03)}
.method-header{display:flex;align-items:flex-start;gap:.75rem;margin-bottom:.35rem}
.method-icon{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:10px;background:rgba(37,99,235,.1);color:var(--brand,#2563eb);font-size:1.1rem}
[data-theme="dark"] .method-icon{background:rgba(59,130,246,.16);color:var(--brand,#64b5f6)}
.method-sub{margin:.1rem 0;color:var(--muted,#64748b)}
.method-feature-grid{list-style:none;display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:.5rem;margin:.6rem 0 0;padding:0}
.method-feature-grid li{background:var(--chip,rgba(0,0,0,.02));border:1px solid var(--border);border-radius:10px;padding:.55rem .65rem;line-height:1.5}
.method-steps{display:grid;gap:.65rem;margin:.6rem 0}
.method-step{display:flex;gap:.6rem;align-items:flex-start}
.step-number{width:30px;height:30px;border-radius:50%;display:grid;place-items:center;background:var(--brand,#2563eb);color:#fff;font-weight:700;font-size:.95rem;box-shadow:0 2px 6px rgba(0,0,0,.12)}
.method-prob-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:.75rem;margin:.75rem 0}
.method-prob-card{background:var(--card);border:1px solid var(--border);border-radius:10px;padding:.75rem .85rem;box-shadow:0 1px 2px rgba(0,0,0,.03)}
.method-prob-card h5{margin:0 0 .35rem 0;font-size:1rem}
.method-badges{display:flex;flex-wrap:wrap;gap:.5rem;margin:.5rem 0}


/* Theme toggle */
.theme-icon{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;font-size:16px;line-height:1;}
