/* =====================================================================
   CARDER - Aves de Risaralda | Fototeca & Convocatoria
   Hoja de estilos principal — tema claro institucional (verde CARDER
   #229c4f) con modo oscuro opcional. El verde institucional se mantiene
   idéntico en ambos temas.
   ===================================================================== */

:root {
  /* Verde institucional CARDER (fijo en ambos temas) */
  --carder-green: #229c4f;
  --carder-green-dark: #1b7d3f;

  --bg: #f2f7f4;
  --bg-2: #e9f1ec;
  --panel: #ffffff;
  --panel-2: #f7faf8;
  --panel-3: #eef4f0;
  --border: rgba(16, 44, 28, 0.12);
  --border-2: #d3e2d9;
  --text: #17251d;
  --muted: #55705f;
  --muted-2: #7d948a;
  --emerald: var(--carder-green);
  --emerald-strong: var(--carder-green-dark);
  --teal: #0f8f7e;
  --amber: #b45309;
  --rose: #dc2626;
  --font-sans: 'Manrope', system-ui, sans-serif;
  --font-display: 'Outfit', system-ui, sans-serif;
  --font-serif: 'Newsreader', Georgia, serif;
  --radius: 14px;
  --shadow-lg: 0 10px 40px rgba(23, 46, 32, 0.14);

  /* Colores contextuales (los heredados por los componentes) */
  --on-photo: #ffffff;                       /* texto sobre fotografías */
  --on-emerald: #ffffff;                     /* texto sobre verde institucional */
  --overlay-photo: linear-gradient(to top, rgba(6, 20, 12, 0.9), rgba(6, 20, 12, 0.32) 45%, transparent);
  --scrim-1: rgba(9, 26, 17, 0.6);
  --scrim-2: rgba(9, 26, 17, 0.96);
  --tint: rgba(34, 156, 79, 0.12);           /* verde translúcido sobre claro */
  --tint-strong: rgba(34, 156, 79, 0.22);
  --tint-border: rgba(34, 156, 79, 0.38);
  --input-bg: #ffffff;
  --input-border: #c4d8cb;
  --header-bg: rgba(255, 255, 255, 0.94);
  --filterbar-bg: rgba(247, 250, 248, 0.85);
  --dropdown-bg: #ffffff;
  --hover-wash: rgba(23, 37, 29, 0.06);
  --active-wash: rgba(23, 37, 29, 0.12);
  --on-wash: var(--text);
  --lightbox-bg: rgba(10, 18, 13, 0.97);
}

/* Formulario de perfil: composición editorial y controles consistentes */
#profileOnboarding.is-form .modal-profile {
  width: min(980px, calc(100vw - 40px));
  max-height: min(820px, calc(100svh - 40px));
  padding: 46px 50px 30px;
  border-radius: 24px;
  background: #fbfcf8;
}
#profileOnboarding.is-form .modal-profile::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 43%;
  height: 300px;
  border-radius: 0 24px 0 0;
  background: linear-gradient(90deg, #fbfcf8 2%, rgba(251, 252, 248, .76) 36%, rgba(251, 252, 248, .08)), url('../img/hero-territorio-carder-dawn.png') center right / cover;
  opacity: .58;
  pointer-events: none;
}
#profileOnboarding.is-form .modal-profile > * { position: relative; z-index: 1; }
#profileOnboarding.is-form #profileOnboardingForm { max-width: 760px; }
#profileOnboarding.is-form #btnProfileBack { display: inline-flex; align-items: center; min-height: 30px; padding: 0 10px; border-radius: 999px; color: #28794a; background: #edf5e9; font-size: 11px; text-decoration: none; }
#profileOnboarding.is-form #profileFormTitle { max-width: 10ch; margin-top: 18px; font: 500 clamp(44px, 5.2vw, 74px)/.88 var(--font-serif); letter-spacing: -.055em; }
#profileOnboarding.is-form #profileFormDescription { max-width: 52ch; margin-top: 13px; font-size: 13px; }
#profileOnboarding.is-form .profile-dynamic-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 18px; margin: 32px 0 20px; }
#profileOnboarding.is-form .dynamic-field:has(textarea) { grid-column: 1 / -1; }
#profileOnboarding.is-form .dynamic-field { gap: 8px; }
#profileOnboarding.is-form .dynamic-field .flabel { color: #31533b !important; font-size: 12px; font-weight: 700; }
#profileOnboarding.is-form .profile-field-control { position: relative; }
#profileOnboarding.is-form .profile-field-icon { position: absolute; z-index: 2; top: 50%; left: 14px; display: grid; width: 19px; height: 19px; place-items: center; color: #6c8372; pointer-events: none; transform: translateY(-50%); }
#profileOnboarding.is-form .profile-field-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
#profileOnboarding.is-form .dynamic-field:has(textarea) .profile-field-icon { top: 17px; transform: none; }
#profileOnboarding.is-form input,
#profileOnboarding.is-form textarea,
#profileOnboarding.is-form select { width: 100%; min-height: 52px; padding: 13px 15px 13px 45px; border: 1px solid #cbd8cf; border-radius: 12px; background: rgba(255, 255, 255, .9); color: #193023; font-size: 13px; box-shadow: 0 2px 10px rgba(42, 75, 51, .04); transition: border-color .18s ease, box-shadow .18s ease, background .18s ease; }
#profileOnboarding.is-form textarea { min-height: 112px; resize: vertical; }
#profileOnboarding.is-form input:focus,
#profileOnboarding.is-form textarea:focus,
#profileOnboarding.is-form select:focus { outline: none; border-color: #28794a; background: #fff; box-shadow: 0 0 0 4px rgba(40, 121, 74, .12); }
#profileOnboarding.is-form .profile-discoverability { margin-top: 18px; padding: 15px 16px; border-radius: 13px; background: #f3f8ee; }
#profileOnboarding.is-form .form-actions { margin-top: 18px; padding-top: 18px; background: transparent; }
#profileOnboarding.is-form .form-actions .btn { min-height: 42px; padding-inline: 18px; border-radius: 10px; font-size: 12px; }

@media (max-width: 680px) {
  #profileOnboarding.is-form .modal-profile { width: min(calc(100vw - 20px), 560px); max-height: calc(100svh - 20px); padding: 28px 20px 22px; border-radius: 20px; }
  #profileOnboarding.is-form .modal-profile::after { width: 62%; height: 170px; border-radius: 0 20px 0 0; opacity: .28; }
  #profileOnboarding.is-form #profileFormTitle { margin-top: 14px; font-size: clamp(40px, 13vw, 58px); }
  #profileOnboarding.is-form .profile-dynamic-fields { grid-template-columns: 1fr; gap: 14px; margin-top: 25px; }
  #profileOnboarding.is-form .dynamic-field:has(textarea) { grid-column: auto; }
  #profileOnboarding.is-form .form-actions { position: sticky; bottom: -22px; margin-inline: -20px; padding: 14px 20px 22px; background: rgba(251, 252, 248, .96); }
}

/* ---------------------------------------------------------------------
   MODO OSCURO (opcional): se activa con [data-theme="dark"] en <html>.
   El verde institucional #229c4f NO cambia. Se alterna desde el botón
   de la cabecera y la preferencia se recuerda en localStorage.
   --------------------------------------------------------------------- */
[data-theme="dark"] {
  --bg: #0a0f11;
  --bg-2: #0d1214;
  --panel: #111719;
  --panel-2: #131d20;
  --panel-3: #162125;
  --border: rgba(255, 255, 255, 0.08);
  --border-2: #23353b;
  --text: #e8eaeb;
  --muted: #9aa3a7;
  --muted-2: #6b7579;
  --teal: #14b8a6;
  --amber: #fbbf24;
  --rose: #e11d48;
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.5);

  --on-emerald: #ffffff; /* blanco sobre verde institucional, como en carder.gov.co */
  --overlay-photo: linear-gradient(to top, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.35) 45%, transparent);
  --scrim-1: rgba(0, 0, 0, 0.6);
  --scrim-2: rgba(0, 0, 0, 0.92);
  --tint: rgba(6, 58, 42, 0.5);
  --tint-strong: rgba(6, 58, 42, 0.7);
  --tint-border: rgba(16, 185, 129, 0.35);
  --input-bg: #182327;
  --input-border: #2b3d44;
  --header-bg: rgba(8, 13, 14, 0.92);
  --filterbar-bg: rgba(8, 13, 14, 0.6);
  --dropdown-bg: #141f23;
  --hover-wash: rgba(255, 255, 255, 0.05);
  --active-wash: rgba(255, 255, 255, 0.1);
  --on-wash: #fff;
  --lightbox-bg: rgba(5, 8, 9, 0.98);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

.container { max-width: 1280px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: 11px; }
.strong { font-weight: 700; }
.ta-r { text-align: right; }
.emerald { color: var(--emerald); }

.app-shell { min-height: 100vh; display: flex; flex-direction: column; }
.site-main { flex: 1; }

/* ===================== HEADER ===================== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.brand-logo {
  height: 46px; width: auto; display: block;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--border);
  padding: 3px;
}
[data-theme="dark"] .brand-logo { background: #fff; }
.brand-icon {
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--tint);
  border: 1px solid var(--tint-border);
  color: var(--emerald);
  display: flex; align-items: center; justify-content: center;
}
.brand-icon svg { width: 18px; height: 18px; }
.brand-icon.big { width: 44px; height: 44px; }
.brand-icon.big svg { width: 22px; height: 22px; }
.brand-text { display: flex; align-items: baseline; gap: 8px; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 17px; color: var(--text); }
.brand-sub { font-size: 12px; color: var(--emerald); font-family: ui-monospace, monospace; }

.main-nav { display: flex; align-items: center; gap: 4px; }
.nav-btn {
  background: none; border: 0; color: var(--muted);
  font-size: 13px; font-weight: 500;
  padding: 7px 13px; border-radius: 9px;
  transition: all 0.15s;
}
.nav-btn:hover { color: var(--on-wash); background: var(--hover-wash); }
.nav-btn.active { color: var(--on-wash); background: var(--active-wash); }
.nav-admin { color: #d3a04f; }
.nav-admin:hover { color: #f0b96b; background: rgba(251, 191, 36, 0.08); }

.header-actions { display: flex; align-items: center; gap: 10px; }
.user-menu { position: relative; }
.user-btn {
  display: flex; align-items: center; gap: 5px;
  background: none; border: 0; padding: 4px 6px; border-radius: 9px;
  color: var(--muted);
}
.user-btn:hover { background: var(--hover-wash); }
.user-btn img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border); }
.user-btn svg { width: 13px; height: 13px; }
.user-btn .user-account-icon { width: 24px; height: 24px; padding: 3px; border: 1px solid currentColor; border-radius: 50%; }
.user-dropdown {
  position: absolute; right: 0; top: calc(100% + 8px);
  width: 250px; background: var(--panel);
  border: 1px solid var(--border); border-radius: 13px;
  box-shadow: var(--shadow-lg); padding: 10px; z-index: 60;
  font-size: 12.5px;
}
.user-dropdown-head { padding: 4px 8px 10px; border-bottom: 1px solid var(--border); margin-bottom: 8px; }
.user-dropdown-head p:first-child { font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-dropdown-head p:last-child { font-size: 11px; color: var(--muted); font-family: ui-monospace, monospace; }
.user-dropdown-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted-2); margin: 2px 8px 6px; }
.role-btn {
  display: block; width: 100%; text-align: left;
  background: none; border: 0; color: var(--text);
  padding: 7px 8px; border-radius: 8px; font-size: 12.5px;
}
.role-btn:hover { background: var(--hover-wash); color: var(--on-wash); }
.user-dropdown-note { font-size: 10.5px; color: var(--muted-2); padding: 8px 8px 2px; }

.nav-burger { display: none; flex-direction: column; gap: 4px; background: none; border: 0; padding: 8px; }
.nav-burger span { width: 20px; height: 2px; background: var(--text); border-radius: 2px; display: block; }

/* Botón claro/oscuro en la cabecera */
.theme-toggle {
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--tint); border: 1px solid var(--tint-border);
  color: var(--emerald);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.15s;
}
.theme-toggle:hover { transform: rotate(12deg); }
.theme-toggle svg { width: 17px; height: 17px; }
.mobile-nav { display: none; padding: 8px 16px 12px; border-top: 1px solid var(--border); flex-wrap: wrap; gap: 6px; }

/* ===================== BOTONES ===================== */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  border: 0; border-radius: 11px;
  font-size: 13px; font-weight: 600;
  padding: 9px 16px;
  transition: all 0.15s;
}
.btn svg { width: 15px; height: 15px; }
.btn-primary { background: var(--emerald-strong); color: var(--on-emerald); }
.btn-primary:hover { background: var(--emerald); }
.btn-primary:active { transform: scale(0.96); }
.btn-ghost {
  background: var(--hover-wash); color: var(--text); border: 1px solid var(--border);
  padding: 6px 11px;
  font-size: 12px;
  gap: 5px;
}
.btn-ghost svg { width: 13px; height: 13px; }
.btn-ghost:hover { background: var(--active-wash); color: var(--on-wash); }
.btn-ghost.emerald {
  background: var(--tint-strong); border-color: var(--tint-border);
  color: var(--carder-green-dark);
}
[data-theme="dark"] .btn-ghost.emerald { color: #6ee7b7; }
.btn-ghost.emerald:hover { background: var(--carder-green); color: #fff; }
.btn-sm { padding: 5px 10px; font-size: 11.5px; }
.btn-sm-header { padding: 5px 11px; font-size: 11.5px; }
.btn-outline { background: transparent; border: 1px solid var(--tint-border); color: var(--emerald); }
.btn-outline:hover { background: var(--tint); color: var(--carder-green-dark); }
[data-theme="dark"] .btn-outline { color: #6ee7b7; }
[data-theme="dark"] .btn-outline:hover { color: #a7f3d0; }
.btn-gold {
  background: linear-gradient(90deg, #34d399, #14b8a6);
  color: #05291c; font-weight: 800;
}
.btn-gold:hover { filter: brightness(1.08); transform: scale(1.02); }
.btn-gradient {
  background: linear-gradient(90deg, var(--carder-green), #0f8f7e);
  color: var(--on-emerald); font-weight: 700;
  box-shadow: 0 6px 24px rgba(34, 156, 79, 0.35);
}
.btn-gradient:hover { filter: brightness(1.1); transform: scale(1.015); }
.btn-gradient:active { transform: scale(0.98); }
.btn-gradient:disabled { opacity: 0.6; cursor: wait; transform: none; }
.btn-vote { background: var(--active-wash); color: var(--on-wash); }
.btn-vote:hover { background: var(--rose); }
.btn-vote.liked { background: var(--rose); }
.link { background: none; border: 0; color: var(--emerald); font-size: 11.5px; text-decoration: underline; cursor: pointer; }
.link:hover { color: var(--carder-green-dark); }
[data-theme="dark"] .link:hover { color: #6ee7b7; }
.link-danger { background: none; border: 0; color: var(--rose); font-size: 12px; text-decoration: underline; font-family: ui-monospace, monospace; }
.link-danger:hover { color: #fda4af; }

/* =====================================================================
   HERO REVOLUTION — slider fullwidth con zoom Ken Burns, tarjetas del
   Catálogo de Risaralda y animaciones de entrada tipo GSAP
   ===================================================================== */
section.hero-rev {
  position: relative;
  max-width: none;
  width: 100%;
  padding: 0 !important;
  margin: 0;
}

.hero-rev-frame {
  position: relative;
  width: 100%;
  height: min(88vh, 780px);
  min-height: 520px;
  overflow: hidden;
  background: var(--bg-2);
  cursor: pointer;
}

/* ---- Slides: crossfade + Ken Burns ---- */
.hero-slide {
  position: absolute; inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1.4s ease, visibility 0s linear 1.4s;
  pointer-events: none;
}
.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
  transition: opacity 1.4s ease;
  pointer-events: auto;
  z-index: 2;
}

.hero-slide-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  will-change: transform;
}
/* Ken Burns: zoom-in continuo mientras el slide está activo */
.hero-slide.is-active .hero-slide-img {
  animation: heroKenBurns 9s ease-out forwards;
}
@keyframes heroKenBurns {
  from { transform: scale(1) translate3d(0, 0, 0); }
  to   { transform: scale(1.12) translate3d(0, -1.2%, 0); }
}

.hero-shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 18, 11, 0.78) 0%, rgba(5, 18, 11, 0.35) 45%, rgba(5, 18, 11, 0.08) 75%),
    linear-gradient(to top, rgba(3, 12, 7, 0.88), transparent 55%);
  pointer-events: none;
}

/* ---- Contenido del slide: entrada escalonada tipo GSAP ---- */
.hero-slide-content {
  position: absolute; inset-inline: 0; bottom: 0;
  padding: clamp(24px, 5vw, 72px);
  max-width: 820px;
  color: #fff;
}
.hero-slide-content > * {
  opacity: 0;
  transform: translateY(26px);
}
.hero-slide.is-active .hero-slide-content > * {
  animation: heroRiseIn 0.95s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.hero-slide.is-active .hero-slide-content > *:nth-child(1) { animation-delay: 0.25s; }
.hero-slide.is-active .hero-slide-content > *:nth-child(2) { animation-delay: 0.38s; }
.hero-slide.is-active .hero-slide-content > *:nth-child(3) { animation-delay: 0.5s; }
.hero-slide.is-active .hero-slide-content > *:nth-child(4) { animation-delay: 0.62s; }
.hero-slide.is-active .hero-slide-content > *:nth-child(5) { animation-delay: 0.76s; }

@keyframes heroRiseIn {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  color: #d9fbe6;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}
.hk-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--carder-green);
  box-shadow: 0 0 0 4px rgba(34, 156, 79, 0.35);
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(30px, 5.2vw, 58px);
  font-weight: 800;
  line-height: 1.05;
  margin: 10px 0 6px;
  text-shadow: 0 3px 24px rgba(0, 0, 0, 0.55);
}
.hero-sci {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(16px, 2.4vw, 24px);
  color: #b9f6ca;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.5);
}
.hero-meta {
  font-size: 12.5px;
  font-family: ui-monospace, monospace;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 8px;
}

.hero-cta-row { display: flex; align-items: center; gap: 12px; margin-top: 20px; }
.btn-hero-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border: 0; border-radius: 999px;
  background: var(--carder-green); color: #fff;
  font-size: 13px; font-weight: 700;
  box-shadow: 0 10px 30px rgba(34, 156, 79, 0.45);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s;
}
.btn-hero-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 38px rgba(34, 156, 79, 0.55); }
.btn-hero-primary svg { width: 16px; height: 16px; }
.btn-hero-vote {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 12px 18px; border: 1px solid rgba(255, 255, 255, 0.35); border-radius: 999px;
  background: rgba(255, 255, 255, 0.12); color: #fff;
  backdrop-filter: blur(6px);
  font-size: 13px; font-weight: 700;
  transition: background 0.2s;
}
.btn-hero-vote:hover { background: rgba(255, 255, 255, 0.22); }
.btn-hero-vote.liked { background: var(--rose); border-color: var(--rose); }
.btn-hero-vote svg { width: 16px; height: 16px; fill: none; }

/* ---- UI del slider ---- */
.hero-ui { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
.hero-ui button, .hero-ui a { pointer-events: auto; }
.hero-pill {
  position: absolute; top: 88px; left: clamp(24px, 5vw, 72px);
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--scrim-1);
  border: 1px solid var(--tint-border);
  backdrop-filter: blur(6px);
  border-radius: 999px;
  padding: 8px 14px;
  color: var(--on-photo);
}
.hero-pill .mun { font-size: 11px; color: rgba(255, 255, 255, 0.65); font-family: ui-monospace, monospace; }
.hero-arrows {
  position: absolute; right: clamp(20px, 4vw, 56px); bottom: clamp(24px, 5vw, 72px);
  display: flex; gap: 10px;
}
.hero-arrow {
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(6px);
  transition: background 0.2s, transform 0.2s;
}
.hero-arrow:hover { background: var(--carder-green); border-color: var(--carder-green); transform: scale(1.06); }
.hero-arrow svg { width: 18px; height: 18px; }

/* Balas con barra de progreso integrada */
.hero-bullets {
  display: flex; gap: 8px;
  position: absolute; left: clamp(24px, 5vw, 72px); bottom: 24px;
}
.hero-bullet {
  width: 34px; height: 5px; border: 0; border-radius: 99px;
  background: rgba(255, 255, 255, 0.28);
  padding: 0; overflow: hidden;
  position: relative;
  transition: width 0.3s;
  cursor: pointer;
}
.hero-bullet.active { width: 54px; }
.hero-bullet i {
  position: absolute; inset: 0; width: 0;
  background: var(--carder-green);
  display: block;
}
/* El relleno del bullet activo lo controla app.js con requestAnimationFrame
   (se pausa al pasar el cursor, sincronizado con el autoplay). */

/* ---- Tarjetas flotantes: Catálogo de Risaralda ---- */
.catalog-cards {
  position: absolute; right: clamp(16px, 4vw, 56px); top: 92px;
  z-index: 6;
  width: min(300px, 26vw);
  display: flex; flex-direction: column; gap: 12px;
  pointer-events: none;
}
.catalog-card {
  pointer-events: auto;
  display: flex; align-items: center; gap: 12px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 16px;
  padding: 10px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  opacity: 0;
  transform: translateX(48px);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s, background 0.25s;
}
.catalog-card:hover {
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
}
/* Entrada escalonada de las tarjetas (tipo GSAP stagger) */
.hero-rev .catalog-card { animation: cardSlideIn 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
.hero-rev .catalog-card:nth-child(1) { animation-delay: 1.05s; }
.hero-rev .catalog-card:nth-child(2) { animation-delay: 1.25s; }
.hero-rev .catalog-card:nth-child(3) { animation-delay: 1.45s; }
@keyframes cardSlideIn {
  from { opacity: 0; transform: translateX(48px); }
  to   { opacity: 1; transform: translateX(0); }
}
.cc-rank {
  flex-shrink: 0;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--carder-green); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800;
  box-shadow: 0 4px 14px rgba(34, 156, 79, 0.5);
}
.catalog-card img {
  width: 62px; height: 48px; border-radius: 11px;
  object-fit: cover; flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.25);
}
.cc-body { min-width: 0; text-align: left; }
.cc-body strong {
  display: block;
  font-family: var(--font-serif); font-style: italic;
  font-size: 12.5px; color: #fff;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cc-body span {
  display: block;
  font-size: 10.5px; color: rgba(255, 255, 255, 0.72);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.catalog-badge {
  pointer-events: auto;
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 6px;
  padding: 10px 16px;
  border-radius: 14px;
  background: var(--carder-green);
  color: #fff;
  box-shadow: 0 12px 34px rgba(34, 156, 79, 0.5);
  opacity: 0;
  transform: translateX(48px);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.hero-rev .catalog-badge { animation: cardSlideIn 0.9s cubic-bezier(0.22, 1, 0.36, 1) 1.65s forwards; }
.catalog-badge:hover { transform: translateY(-3px) scale(1.02); }
.cb-count { font-size: 20px; font-weight: 800; font-family: ui-monospace, monospace; }
.cb-text { display: flex; flex-direction: column; font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.92; }
.cb-text strong { font-size: 12.5px; letter-spacing: 0.02em; text-transform: none; }

/* Ancla de la galería (bajo el slider) */
#galleryAnchor { scroll-margin-top: 90px; }

/* El frame del hero antiguo ya no se usa */
.hero-frame { display: none; }

/* Responsive del slider */
@media (max-width: 1100px) {
  .catalog-cards { display: none; }
}
@media (max-width: 760px) {
  .hero-rev-frame { height: 74vh; min-height: 440px; }
  .hero-pill { top: 80px; }
  .hero-arrows { display: none; }
  .hero-bullets { bottom: 18px; }
}

/* ===================== FILTROS ===================== */
.filter-bar { border-bottom: 1px solid var(--border); background: var(--filterbar-bg); backdrop-filter: blur(8px); }
.filter-inner { display: flex; align-items: center; gap: 12px; padding: 11px 20px; flex-wrap: wrap; }
.search-wrap { position: relative; flex: 1; min-width: 200px; }
.search-wrap.small { flex: 0 0 200px; min-width: 150px; }
.search-ico {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  width: 14px; height: 14px; color: var(--muted-2); pointer-events: none;
}
.search-wrap input {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 11px;
  color: var(--text); font-size: 12.5px; font-family: ui-monospace, monospace;
  padding: 9px 34px 9px 36px;
  outline: none;
  transition: border 0.15s;
}
.search-wrap input { background: var(--input-bg); border: 1px solid var(--input-border); }
.search-wrap input:focus { border-color: var(--emerald); background: var(--input-bg); }
.search-clear {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  background: none; border: 0; color: var(--muted); font-size: 15px;
}
.search-clear:hover { color: var(--text); }
.btn-ghost.filter-toggle { display: inline-flex; }
.filter-count {
  min-width: 17px; height: 17px; border-radius: 99px;
  background: var(--emerald); color: var(--on-emerald);
  font-size: 10.5px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
}
.select-ghost {
  background: var(--panel); color: var(--muted);
  border: 1px solid var(--border); border-radius: 11px;
  padding: 9px 10px; font-size: 12.5px; outline: none; cursor: pointer;
}
.select-ghost:hover { color: var(--text); }
.filter-drawer { padding: 12px 20px 14px; border-top: 1px solid var(--border); display: grid; gap: 12px; }
.drawer-label { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.09em; color: var(--muted-2); font-family: ui-monospace, monospace; margin-bottom: 7px; }
.pill-row { display: flex; flex-wrap: wrap; gap: 6px; }
.pill {
  padding: 5px 11px; border-radius: 9px; border: 0;
  background: var(--hover-wash); color: var(--muted);
  font-size: 12px; font-family: ui-monospace, monospace;
  transition: all 0.15s;
}
.pill:hover { color: var(--on-wash); background: var(--active-wash); }
.pill.active-mun { background: var(--emerald-strong); color: var(--on-emerald); }
.pill.active-eco { background: var(--teal); color: var(--on-emerald); }
.pill.active { background: var(--active-wash); color: var(--on-wash); }
.drawer-footer { display: flex; justify-content: flex-end; }

/* ===================== GALERÍA ===================== */
.gallery-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 26px 0 20px; }
.gallery-count { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); font-family: ui-monospace, monospace; }
.gallery-count strong { color: var(--text); }
.gallery-count .dot { color: var(--muted-2); }
.view-switch { display: flex; gap: 4px; background: var(--panel); padding: 4px; border-radius: 11px; border: 1px solid var(--border); }
.view-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: 0; color: var(--muted);
  font-size: 12px; font-family: ui-monospace, monospace;
  padding: 5px 11px; border-radius: 8px;
}
.view-btn svg { width: 13px; height: 13px; }
.view-btn:hover { color: var(--on-wash); }
.view-btn.active { background: var(--active-wash); color: var(--on-wash); }

.banner-mine {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin: 22px 0; padding: 16px 18px;
  background: var(--tint); border: 1px solid var(--tint-border); border-radius: 16px;
}
.banner-mine h2 { font-size: 15px; color: var(--text); }
.banner-mine p { font-size: 12px; color: var(--emerald); margin-top: 2px; }

/* Filmstrip */
.reel-wrap { padding-bottom: 24px; user-select: none; }
.reel-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.reel-index { font-family: ui-monospace, monospace; font-size: 12px; color: var(--muted); }
.reel-index strong { color: var(--text); }
.reel-index span { color: var(--muted-2); margin: 0 3px; }
.reel-arrows { display: flex; gap: 4px; }
.reel-arrows button {
  background: var(--hover-wash); border: 0; color: var(--muted);
  width: 30px; height: 30px; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
}
.reel-arrows button:hover { background: var(--active-wash); color: var(--on-wash); }
.reel-arrows svg { width: 16px; height: 16px; }
.reel-track {
  display: flex; gap: 22px;
  overflow-x: auto; scroll-behavior: smooth;
  padding: 4px 24px 22px;
  cursor: grab;
  scrollbar-width: none;
}
.reel-track::-webkit-scrollbar { display: none; }
.reel-track.dragging { cursor: grabbing; scroll-behavior: auto; }
.reel-card { flex: 0 0 auto; width: 380px; cursor: pointer; }
.reel-card .frame {
  position: relative; aspect-ratio: 16 / 10;
  border-radius: 16px; overflow: hidden;
  background: var(--bg-2); border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  transition: border 0.2s;
}
.reel-card:hover .frame { border-color: var(--border-2); }
.reel-card .frame img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.reel-card:hover .frame img { transform: scale(1.05); }
.reel-card .idx {
  position: absolute; top: 12px; left: 12px;
  padding: 3px 8px; border-radius: 7px;
  background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(4px);
  font-size: 10px; font-family: ui-monospace, monospace; color: rgba(255, 255, 255, 0.85);
}
.reel-card .loc-banner {
  position: absolute; inset-inline: 0; bottom: 0;
  padding: 26px 12px 10px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.82), transparent);
  display: flex; justify-content: space-between;
  font-size: 11px; font-family: ui-monospace, monospace; color: rgba(255, 255, 255, 0.88);
  opacity: 0; transition: opacity 0.2s;
}
.reel-card:hover .loc-banner { opacity: 1; }
.reel-card .loc-banner .alt { color: var(--emerald); }
.reel-card .caption { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 10px 4px 0; }
.reel-card h3 { font-size: 14px; font-weight: 600; color: var(--on-photo); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reel-card:hover h3 { color: var(--emerald); }
.reel-card .sci { font-family: var(--font-serif); font-style: italic; font-size: 12.5px; color: rgba(110, 231, 183, 0.9); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reel-card .author { font-size: 11.5px; color: var(--muted-2); font-family: ui-monospace, monospace; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.like-btn {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px;
  border: 0; border-radius: 99px;
  padding: 6px 12px; font-size: 12px; font-family: ui-monospace, monospace;
  background: var(--hover-wash); color: var(--muted);
  transition: all 0.15s;
}
.like-btn svg { width: 13px; height: 13px; }
.like-btn:hover { background: var(--rose); color: #fff; }
.like-btn.liked { background: var(--rose); color: #fff; }
.like-btn { color: var(--text); }
.like-btn.liked svg { fill: currentColor; }

/* Mosaico */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px; padding-bottom: 30px; }
.photo-card { cursor: pointer; }
.photo-card .frame {
  position: relative; aspect-ratio: 4 / 3;
  border-radius: 13px; overflow: hidden;
  background: var(--bg-2); border: 1px solid var(--border);
  transition: all 0.2s;
}
.photo-card:hover { transform: translateY(-2px); }
.photo-card:hover .frame { border-color: var(--border-2); }
.photo-card .frame img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.photo-card:hover .frame img { transform: scale(1.05); }
.badge-book {
  position: absolute; top: 10px; left: 10px;
  padding: 3px 8px; border-radius: 7px;
  background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-size: 10px; font-family: ui-monospace, monospace; color: #b9f6ca;
}
.photo-card .telemetry {
  position: absolute; inset-inline: 0; bottom: 0;
  padding: 24px 10px 9px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  display: flex; justify-content: space-between;
  font-size: 10px; font-family: ui-monospace, monospace; color: #d1d5db;
  opacity: 0; transition: opacity 0.2s; pointer-events: none;
}
.photo-card:hover .telemetry { opacity: 1; }
.photo-card .telemetry .alt { color: var(--emerald); font-weight: 700; }
.photo-card .meta { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 9px 2px 0; }
.photo-card h3 { font-size: 13.5px; font-weight: 500; color: var(--on-photo); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.photo-card:hover h3 { color: var(--emerald); }
.photo-card .sci { font-family: var(--font-serif); font-style: italic; font-size: 12px; color: rgba(110, 231, 183, 0.9); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.photo-card .author { font-size: 11px; color: var(--muted-2); font-family: ui-monospace, monospace; margin-top: 2px; }

.empty-state {
  text-align: center; padding: 60px 24px;
  background: var(--panel); border: 1px solid var(--border-2); border-radius: 18px;
  margin: 30px 0 60px;
  display: grid; gap: 12px; justify-items: center;
}
.empty-ico {
  width: 62px; height: 62px; border-radius: 50%;
  background: var(--tint-strong); border: 1px solid var(--tint-border);
  color: var(--emerald);
  display: flex; align-items: center; justify-content: center;
}
.empty-ico svg { width: 28px; height: 28px; }
.empty-state h3 { font-size: 17px; color: var(--text); }
.empty-state p { font-size: 12.5px; color: var(--muted); max-width: 440px; }
.empty-actions { display: flex; gap: 12px; padding-top: 8px; }

/* ===================== MAPA ===================== */
#view-mapa { display: flex; flex-direction: column; height: calc(100vh - 68px); min-height: 560px; }
.map-toolbar { background: var(--panel); border-bottom: 1px solid var(--border-2); z-index: 30; }
.map-toolbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 20px; flex-wrap: wrap; }
.map-title { display: flex; align-items: center; gap: 12px; }
.map-ico {
  width: 34px; height: 34px; border-radius: 11px;
  background: var(--tint-strong); border: 1px solid var(--tint-border);
  color: var(--emerald); display: flex; align-items: center; justify-content: center;
}
.map-ico svg { width: 17px; height: 17px; }
.map-title-row { display: flex; align-items: center; gap: 10px; }
.map-title-row h2 { font-family: var(--font-display); font-size: 14.5px; color: var(--on-photo); }
.map-title p { font-size: 11px; color: var(--muted); }
.chip {
  padding: 2px 9px; border-radius: 99px;
  background: var(--tint); border: 1px solid var(--tint-border);
  color: var(--carder-green-dark); font-size: 10.5px; font-family: ui-monospace, monospace;
}
[data-theme="dark"] .chip { color: #6ee7b7; }
.chip.emerald { display: inline-flex; align-items: center; gap: 5px; padding: 6px 10px; }
.map-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.layer-switch { display: flex; gap: 3px; background: var(--panel-3); padding: 4px; border-radius: 11px; border: 1px solid var(--input-border); }
.layer-switch button {
  background: none; border: 0; color: var(--muted);
  font-size: 11px; padding: 5px 9px; border-radius: 8px;
}
.layer-switch button:hover { color: var(--on-photo); }
.layer-switch button.active { background: var(--emerald-strong); color: var(--on-emerald); font-weight: 600; }
.map-canvas { flex: 1; min-height: 420px; background: var(--bg-2); z-index: 1; }
.hotspots-drawer {
  position: absolute; top: 84px; left: 20px; z-index: 40;
  width: 320px; max-height: 70vh; overflow-y: auto;
  background: var(--dropdown-bg); backdrop-filter: blur(8px);
  border: 1px solid var(--border-2); border-radius: 16px;
  padding: 16px; box-shadow: var(--shadow-lg);
}
.hotspots-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 10px; border-bottom: 1px solid #21333a; margin-bottom: 10px; }
.hotspots-head h3 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--on-photo); }
.hotspots-head button { background: none; border: 0; color: var(--muted); font-size: 18px; }
.hotspots-drawer > p { font-size: 11px; color: #d1d5db; margin-bottom: 10px; }
.hotspot-item {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%; text-align: left;
  background: var(--panel-3); border: 1px solid var(--input-border); border-radius: 11px;
  padding: 8px 10px; margin-bottom: 7px; color: var(--on-photo);
  transition: all 0.15s;
}
.hotspot-item:hover { background: var(--tint-strong); border-color: var(--tint-border); }
.hotspot-item .hn { font-size: 12px; font-weight: 600; }
.hotspot-item .hc { font-size: 10px; color: var(--muted); font-family: ui-monospace, monospace; margin-top: 2px; }
.map-legend {
  position: absolute; bottom: 20px; right: 20px; z-index: 30;
  background: var(--dropdown-bg); backdrop-filter: blur(6px);
  border: 1px solid var(--border-2); border-radius: 12px;
  padding: 11px 13px; font-size: 10.5px; color: var(--muted);
  display: grid; gap: 6px; pointer-events: none;
}
.legend-title { font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--on-photo); font-size: 10.5px; display: flex; align-items: center; gap: 6px; }
.dot-eco { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-right: 7px; }
#view-mapa { position: relative; }
.leaflet-container { background: var(--bg-2); }
.photo-pin { border-radius: 999px; border: 3px solid var(--carder-green); overflow: hidden; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45); background: #fff; width: 42px; height: 42px; cursor: pointer; transition: transform 0.15s; }
.photo-pin:hover { transform: scale(1.18); }
.photo-pin.highlight { border-color: var(--amber); width: 52px; height: 52px; }
.photo-pin img { width: 100%; height: 100%; object-fit: cover; }
.minimap-radar-icon { background: none; border: none; }

/* ===================== RANKING ===================== */
#view-ranking { padding: 36px 0 70px; }
.rank-head { text-align: center; max-width: 720px; margin: 0 auto 42px; display: grid; gap: 12px; }
.rank-badge {
  justify-self: center;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 14px; border-radius: 99px;
  background: rgba(217, 119, 6, 0.1); border: 1px solid rgba(217, 119, 6, 0.35);
  color: var(--amber); font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em;
}
[data-theme="dark"] .rank-badge { background: rgba(251, 191, 36, 0.1); border-color: rgba(251, 191, 36, 0.3); color: #fcd34d; }
.rank-badge svg { width: 14px; height: 14px; }
.rank-head h1 { font-family: var(--font-display); font-size: clamp(26px, 4.5vw, 40px); font-weight: 800; }
.rank-head p { font-size: 13px; color: var(--muted); }
.podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: end; margin-bottom: 46px; }
.podium-card { position: relative; border-radius: 18px; padding: 18px; box-shadow: var(--shadow-lg); }
.podium-card .medal {
  position: absolute; top: -16px; left: 50%; transform: translateX(-50%);
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 14px;
  box-shadow: 0 0 0 5px var(--bg);
}
.podium-card .medal svg { width: 18px; height: 18px; }
.podium-card.silver { background: linear-gradient(180deg, #ffffff, #eef2f5); border: 1px solid rgba(100, 116, 139, 0.45); }
.podium-card.silver .medal { background: #cbd5e1; color: #0f172a; }
.podium-card.gold { background: linear-gradient(180deg, #fffbeb, #ffffff); border: 2px solid rgba(217, 119, 6, 0.65); padding: 22px; transform: translateY(-14px); }
.podium-card.gold .medal { background: linear-gradient(90deg, #fcd34d, #f59e0b); color: #451a03; width: 40px; height: 40px; }
.podium-card.bronze { background: linear-gradient(180deg, #fef7ed, #ffffff); border: 1px solid rgba(180, 83, 9, 0.5); }
.podium-card.bronze .medal { background: #b45309; color: #fef3c7; }
[data-theme="dark"] .podium-card.silver { background: linear-gradient(180deg, #1b262a, #121a1d); }
[data-theme="dark"] .podium-card.gold { background: linear-gradient(180deg, #2a2414, #12191b); border-color: rgba(251, 191, 36, 0.8); }
[data-theme="dark"] .podium-card.bronze { background: linear-gradient(180deg, #211a15, #121a1d); }
.podium-card .p-img {
  aspect-ratio: 4/3; border-radius: 12px; overflow: hidden;
  background: #000; margin-bottom: 12px; cursor: pointer; position: relative;
}
.podium-card.gold .p-img { box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.4); }
.podium-card .p-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.podium-card .p-img:hover img { transform: scale(1.05); }
.podium-card .p-leader {
  position: absolute; top: 10px; right: 10px;
  background: var(--amber); color: #ffffff;
  font-size: 10px; font-weight: 900; text-transform: uppercase;
  padding: 3px 8px; border-radius: 6px;
}
[data-theme="dark"] .podium-card .p-leader { color: #451a03; }
.podium-card .p-label { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 6px; }
.podium-card.silver .p-label { color: #64748b; }
.podium-card.gold .p-label { color: #b45309; }
.podium-card.bronze .p-label { color: #b45309; }
[data-theme="dark"] .podium-card.silver .p-label { color: #cbd5e1; }
[data-theme="dark"] .podium-card.gold .p-label { color: #fcd34d; }
[data-theme="dark"] .podium-card.bronze .p-label { color: #f59e0b; }
.podium-card h3 { font-size: 13.5px; color: var(--on-photo); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium-card.gold h3 { font-size: 15px; }
.podium-card .p-sci { font-family: var(--font-serif); font-style: italic; color: var(--emerald); font-size: 12.5px; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium-card .p-author { font-size: 11px; color: var(--muted); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium-card .p-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--tint-border); }
.podium-card .p-votes { font-family: ui-monospace, monospace; font-weight: 700; }
.podium-card.gold .p-votes { color: #b45309; font-size: 14px; }
[data-theme="dark"] .podium-card.gold .p-votes { color: #fcd34d; }
.rank-two { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-bottom: 40px; }
.panel { background: var(--panel-2); border: 1px solid var(--border-2); border-radius: 18px; padding: 22px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--border-2); margin-bottom: 14px; }
.panel-head h3 { font-size: 13px; color: var(--text); font-family: var(--font-display); }
.panel-head span { font-size: 11px; color: var(--muted); }
.rank-list { display: grid; gap: 10px; }
.rank-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--panel); border: 1px solid var(--border-2); border-radius: 12px; padding: 10px 12px;
  transition: background 0.15s;
}
.rank-item:hover { background: var(--panel-3); }
.rank-item .ri-left { display: flex; align-items: center; gap: 11px; min-width: 0; }
.rank-item .pos {
  width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0;
  background: var(--panel-3); color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  font-size: 11.5px; font-weight: 900;
}
.rank-item:first-child .pos { background: var(--amber); color: #451a03; }
.rank-item:nth-child(2) .pos { background: #cbd5e1; color: #0f172a; }
.rank-item img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; border: 1px solid var(--tint-border); }
.rank-item h4 { font-size: 12.5px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-item .ri-sub { font-size: 10px; color: var(--muted); }
.rank-item .ri-votes { display: flex; align-items: center; gap: 6px; color: var(--emerald); font-weight: 700; font-family: ui-monospace, monospace; font-size: 12.5px; flex-shrink: 0; }
.rank-item .ri-votes svg { width: 13px; height: 13px; fill: currentColor; color: #fb7185; }
.rank-table-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.rank-table-head h3 { font-family: var(--font-display); font-size: 17px; }
.rank-table-head span { font-size: 12px; color: var(--muted); font-family: ui-monospace, monospace; }
.table-scroll { border: 1px solid var(--border-2); border-radius: 16px; overflow: hidden; }
.rank-table { width: 100%; border-collapse: collapse; font-size: 12.5px; color: var(--text); }
.rank-table thead { background: var(--panel-3); }
.rank-table th { text-align: left; padding: 12px 16px; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); border-bottom: 1px solid var(--border-2); }
.rank-table td { padding: 11px 16px; border-bottom: 1px solid #1e2e33; }
.rank-table tbody tr { cursor: pointer; transition: background 0.12s; }
.rank-table tbody tr:hover { background: var(--panel-2); }
.rank-table .pos-cell { font-family: ui-monospace, monospace; font-weight: 700; color: var(--text); }
.rank-table .cell-photo { display: flex; align-items: center; gap: 12px; min-width: 0; }
.rank-table .cell-photo img { width: 48px; height: 38px; border-radius: 9px; object-fit: cover; border: 1px solid var(--border); flex-shrink: 0; }
.rank-table .cell-photo p:first-child { font-weight: 700; color: var(--text); }
.rank-table .cell-photo .sci { font-family: var(--font-serif); font-style: italic; color: var(--emerald); font-size: 11px; }
.status-badge { padding: 2px 9px; border-radius: 7px; font-size: 10px; font-weight: 600; white-space: nowrap; }
.status-badge.libro_aves { background: var(--tint); color: var(--carder-green-dark); border: 1px solid var(--tint-border); }
.status-badge.mundial_aves { background: rgba(15, 143, 126, 0.12); color: var(--teal); border: 1px solid rgba(15, 143, 126, 0.38); }
[data-theme="dark"] .status-badge.libro_aves { background: rgba(6, 58, 42, 0.85); color: #6ee7b7; }
[data-theme="dark"] .status-badge.mundial_aves { background: rgba(19, 78, 74, 0.85); color: #5eead4; }
.status-badge.aprobada { background: var(--panel-3); color: var(--muted); }
.status-badge.pendiente { background: rgba(217, 119, 6, 0.14); color: var(--amber); }
.status-badge.rechazada { background: rgba(220, 38, 38, 0.12); color: var(--rose); }
.rank-table .votes-cell { text-align: right; font-family: ui-monospace, monospace; font-weight: 700; color: var(--emerald); }

/* ===================== CONVOCATORIA ===================== */
#view-convocatoria { padding: 36px 0 70px; }
.convocatoria { display: grid; gap: 44px; }
.conv-hero {
  position: relative; overflow: hidden;
  border-radius: 24px; border: 1px solid var(--tint-border);
  background: linear-gradient(135deg, #0c221b, #122e25 55%, #0a181b);
  padding: clamp(28px, 6vw, 52px);
  box-shadow: var(--shadow-lg);
}
.conv-hero-inner { position: relative; z-index: 1; max-width: 700px; display: grid; gap: 16px; }
.conv-badge {
  justify-self: start;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 13px; border-radius: 99px;
  background: var(--tint-strong); border: 1px solid var(--tint-border);
  color: var(--carder-green-dark); font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
}
.conv-badge svg { width: 14px; height: 14px; }
.conv-hero h1 { font-family: var(--font-display); font-size: clamp(26px, 5vw, 46px); font-weight: 900; line-height: 1.1; }
.conv-hero p { color: rgba(209, 250, 229, 0.9); font-size: 14.5px; }
.conv-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding-top: 8px; }
.conv-free { font-size: 12px; color: rgba(110, 231, 183, 0.8); }
.conv-two { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.conv-ico { width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.conv-ico svg { width: 20px; height: 20px; }
.conv-ico.emerald { background: var(--tint); border: 1px solid var(--tint-border); color: var(--emerald); }
.conv-ico.teal { background: rgba(15, 143, 126, 0.12); border: 1px solid rgba(15, 143, 126, 0.38); color: var(--teal); }
[data-theme="dark"] .conv-ico.teal { background: rgba(19, 78, 74, 0.6); border-color: rgba(20, 184, 166, 0.3); color: #2dd4bf; }
.conv-two h3 { font-family: var(--font-display); font-size: 17px; margin-bottom: 8px; }
.conv-two p { font-size: 12.5px; color: var(--text); line-height: 1.65; }
.conv-criteria h2 { font-family: var(--font-display); font-size: 19px; margin-bottom: 18px; }
.criteria-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.criteria-item { background: var(--panel); border: 1px solid var(--border-2); border-radius: 13px; padding: 15px; }
.criteria-item h4 { font-size: 13px; color: var(--text); margin-bottom: 7px; }
.criteria-item p { font-size: 12px; color: var(--muted); line-height: 1.65; }
.conv-municipalities h3 { font-size: 15px; margin-bottom: 4px; }
.conv-municipalities .muted { font-size: 12px; margin-bottom: 14px; }
.mun-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.mun-card { background: var(--panel); border: 1px solid var(--border-2); border-radius: 12px; padding: 12px; font-size: 12px; }
.mun-card p:first-child { font-weight: 700; color: var(--text); }
.mun-card .eco { color: var(--emerald); font-size: 10.5px; margin: 3px 0 5px; }
.mun-card .spot { color: var(--muted); font-size: 10.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ===================== FOOTER ===================== */
.site-footer { background: var(--panel-2); border-top: 1px solid var(--border-2); padding: 38px 0 26px; margin-top: 60px; }
#view-mapa + .site-footer, #view-mapa ~ .site-footer { margin-top: 0; }
.footer-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-bottom: 22px; border-bottom: 1px solid #1c292e; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand h3 { font-size: 14px; color: var(--text); }
.footer-brand p { font-size: 11.5px; color: var(--muted); }
.footer-links { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.footer-links button, .footer-links a { background: none; border: 0; color: var(--muted); font-size: 12px; }
.footer-links button:hover, .footer-links a:hover { color: var(--emerald); }
.footer-links #btnFooterUpload { color: var(--carder-green-dark); font-weight: 600; }
[data-theme="dark"] .footer-links #btnFooterUpload { color: #6ee7b7; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding-top: 18px; font-size: 11px; color: #6b7579; }

/* ===================== LIGHTBOX ===================== */
.lightbox { position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; background: var(--lightbox-bg); backdrop-filter: blur(14px); }
.lb-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 11px 20px; border-bottom: 1px solid var(--tint-border); background: var(--scrim-2); }
.lb-title { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.lb-title h2 { font-size: 14.5px; font-weight: 500; color: var(--on-photo); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-title span { font-family: var(--font-serif); font-style: italic; color: var(--emerald); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-actions { display: flex; align-items: center; gap: 5px; flex-shrink: 0; }
.lb-actions button {
  background: none; border: 0; color: var(--muted);
  width: 34px; height: 34px; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.lb-actions button:hover { background: rgba(255, 255, 255, 0.08); color: var(--on-photo); }
.lb-actions svg { width: 16px; height: 16px; }
.lb-actions #btnLbClose:hover { background: rgba(255, 255, 255, 0.12); }
.lb-body { flex: 1; display: flex; min-height: 0; }
.lb-stage { flex: 1; position: relative; display: flex; align-items: center; justify-content: center; padding: 26px; background: rgba(0, 0, 0, 0.4); overflow: auto; }
.lb-img-wrap img { max-height: 82vh; max-width: 100%; object-fit: contain; border-radius: 12px; box-shadow: var(--shadow-lg); transition: transform 0.2s; }
.lb-stage.zoomed .lb-img-wrap img { max-height: none; transform: scale(1.5); cursor: grab; }
.lb-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(0, 0, 0, 0.6); color: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex; align-items: center; justify-content: center;
}
.lb-arrow:hover { background: rgba(0, 0, 0, 0.92); color: #fff; }
.lb-arrow svg { width: 19px; height: 19px; }
.lb-arrow.left { left: 16px; }
.lb-arrow.right { right: 16px; }
.lb-coords { position: absolute; bottom: 14px; left: 24px; font-size: 10px; font-family: ui-monospace, monospace; color: var(--muted-2); }
.lb-details { width: 380px; flex-shrink: 0; background: var(--scrim-2); border-left: 1px solid var(--tint-border); padding: 20px; overflow-y: auto; display: grid; gap: 18px; font-size: 12.5px; align-content: start; color: var(--on-photo); }
.lb-vote { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--tint-border); }
.lb-vote strong { display: block; color: var(--on-photo); }
.lb-vote span { font-size: 11px; color: var(--muted); }
.lb-vote svg { width: 14px; height: 14px; }
.lb-mini { position: relative; height: 176px; border-radius: 13px; overflow: hidden; border: 1px solid #22353c; background: #0c1214; }
.lb-mini .leaflet-container { height: 100%; width: 100%; }
.lb-mini-tag {
  position: absolute; top: 8px; left: 8px; z-index: 500;
  padding: 3px 8px; border-radius: 7px;
  background: rgba(0, 0, 0, 0.75); backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 10px; font-family: ui-monospace, monospace; color: #6ee7b7;
}
.lb-mini-layer {
  position: absolute; top: 8px; right: 8px; z-index: 500;
  padding: 3px 8px; border-radius: 7px;
  background: rgba(0, 0, 0, 0.7); border: 1px solid rgba(255, 255, 255, 0.1);
  color: #d1d5db; font-size: 10px;
}
.lb-mini-layer:hover { background: rgba(0, 0, 0, 0.92); color: var(--on-photo); }
.lb-mini-loc {
  position: absolute; inset-inline: 8px; bottom: 8px; z-index: 500;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.lb-mini-loc .loc-names p:first-child { color: var(--on-photo); font-size: 11px; font-weight: 600; text-shadow: 0 1px 3px #000; }
.lb-mini-loc .loc-names p:last-child { color: var(--muted); font-size: 10px; font-family: ui-monospace, monospace; text-shadow: 0 1px 3px #000; }
.lb-mini-loc .btn-atlas {
  background: rgba(6, 58, 42, 0.92); color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: 7px; font-size: 10px; font-weight: 700; padding: 4px 8px;
}
.lb-mini-loc .btn-atlas:hover { background: var(--carder-green); color: #fff; }
.lb-specs-title { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; padding-bottom: 8px; }
.lb-specs-box { background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.05); border-radius: 12px; padding: 12px; display: grid; gap: 5px; font-family: ui-monospace, monospace; }
.lb-specs-box > div:first-child { color: var(--on-photo); font-weight: 500; }
.lb-specs-box .muted { font-size: 11px; }
.lb-specs-box .emerald { font-size: 11px; font-weight: 600; }
.lb-author { display: flex; align-items: center; gap: 10px; padding-top: 8px; border-top: 1px solid var(--tint-border); }
.lb-author img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; border: 1px solid var(--tint-border); }
.lb-author p:first-child { color: var(--on-photo); font-weight: 600; font-size: 12px; }
.lb-author p:last-child { font-size: 11px; }
.lb-desc { font-style: italic; color: var(--muted); background: rgba(255, 255, 255, 0.02); padding: 10px; border-radius: 9px; }

/* ===================== MODAL SUBIDA ===================== */
.modal-backdrop { position: fixed; inset: 0; z-index: 95; background: rgba(0, 0, 0, 0.85); backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; padding: 16px; overflow-y: auto; }
.modal-upload { width: min(880px, 100%); background: var(--panel); border: 1px solid var(--border-2); border-radius: 18px; box-shadow: var(--shadow-lg); overflow: hidden; margin: auto; }
.modal-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 14px;
  padding: 20px 24px;
  background: linear-gradient(90deg, var(--tint-strong), var(--panel-2) 55%, var(--tint));
  border-bottom: 1px solid var(--tint-border);
}
.modal-head h2 { font-family: var(--font-display); font-size: 17px; color: var(--text); margin-top: 8px; }
.modal-head p { font-size: 12px; color: var(--muted); margin-top: 5px; max-width: 620px; }
.modal-badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 4px 10px; border-radius: 8px;
  background: var(--tint-strong); border: 1px solid var(--tint-border);
  color: var(--carder-green-dark); font-size: 11px; font-weight: 600;
}
[data-theme="dark"] .modal-badge { color: #6ee7b7; }
.modal-badge svg { width: 13px; height: 13px; }
.modal-close { background: var(--hover-wash); border: 0; color: var(--muted); width: 30px; height: 30px; border-radius: 9px; font-size: 18px; flex-shrink: 0; }
.modal-close:hover { background: var(--active-wash); color: var(--on-wash); }
.modal-body { padding: 22px 24px; display: grid; gap: 22px; max-height: calc(100vh - 120px); overflow-y: auto; }
.form-error { background: rgba(220, 38, 38, 0.08); border: 1px solid rgba(220, 38, 38, 0.4); color: var(--rose); font-size: 12.5px; padding: 12px 14px; border-radius: 12px; }
.fsec { display: grid; gap: 9px; }
.fsec-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.fsec-label { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--emerald); }
.flabel { display: block; font-size: 12px; font-weight: 600; color: var(--text); margin-bottom: 5px; }
.flabel.small { font-size: 11px; font-weight: 500; color: #cbd5e1; }
.dropzone { border: 2px dashed #2d424b; border-radius: 16px; padding: 24px; text-align: center; background: #131d20; transition: all 0.15s; }
.dropzone.dragover { border-color: var(--tint-border); background: var(--tint); }
.dropzone.has-file { border-style: solid; border-color: var(--tint-border); background: var(--tint); }
.dz-empty { display: grid; gap: 8px; justify-items: center; padding: 14px 0; }
.dz-ico { width: 48px; height: 48px; border-radius: 50%; background: var(--tint-strong); border: 1px solid var(--tint-border); color: var(--emerald); display: flex; align-items: center; justify-content: center; }
.dz-ico svg { width: 22px; height: 22px; }
.dz-empty p:first-of-type { font-size: 13.5px; font-weight: 600; color: var(--text); }
.dz-empty p:last-of-type { font-size: 12px; }
.dz-preview img { max-height: 250px; width: auto; margin: 0 auto 12px; border-radius: 12px; border: 1px solid var(--tint-border); }
.dz-actions { display: flex; align-items: center; justify-content: center; gap: 10px; }
.species-search { position: relative; }
.species-search input {
  width: 100%; background: var(--input-bg); border: 1px solid var(--input-border); border-radius: 12px;
  color: var(--text); padding: 11px 15px; font-size: 13px; outline: none;
}
.species-search input:focus { border-color: var(--emerald); }
.species-dropdown {
  position: absolute; inset-inline: 0; top: calc(100% + 6px); z-index: 30;
  background: var(--dropdown-bg); border: 1px solid var(--input-border); border-radius: 13px;
  max-height: 230px; overflow-y: auto; box-shadow: var(--shadow-lg);
}
.species-option { padding: 11px 14px; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12px; border-bottom: 1px solid var(--border); }
.species-option:hover { background: var(--panel-3); }
.species-option .sn { font-family: var(--font-serif); font-style: italic; font-weight: 700; color: var(--carder-green-dark); font-size: 13.5px; }
[data-theme="dark"] .species-option .sn { color: #6ee7b7; }
.species-option .sf { color: var(--muted); font-size: 11px; margin-top: 2px; }
.species-option .src { flex-shrink: 0; padding: 2px 8px; border-radius: 6px; background: var(--tint); border: 1px solid var(--tint-border); color: var(--emerald); font-size: 10px; font-family: ui-monospace, monospace; }
.species-selected { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--tint); border: 1px solid var(--tint-border); border-radius: 12px; padding: 12px 14px; }
.species-selected .sci-name { font-family: var(--font-serif); font-style: italic; font-weight: 700; color: var(--carder-green-dark); font-size: 14px; }
[data-theme="dark"] .species-selected .sci-name { color: #6ee7b7; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: 1 / -1; }
.modal-body input[type="text"], .modal-body input[type="email"], .modal-body input[type="number"], .modal-body input[type="date"],
.modal-body select, .modal-body textarea {
  width: 100%; background: var(--input-bg); border: 1px solid var(--input-border); border-radius: 11px;
  color: var(--text); padding: 9px 13px; font-size: 13px; outline: none;
}
.modal-body input:focus, .modal-body select:focus, .modal-body textarea:focus { border-color: var(--emerald); }
.modal-body textarea { resize: vertical; }
.terms-box { background: var(--panel-3); border: 1px solid var(--border-2); border-radius: 14px; padding: 16px; display: grid; gap: 12px; }
.terms-title { display: flex; align-items: center; gap: 8px; color: var(--emerald); font-weight: 700; font-size: 12.5px; }
.terms-title svg { width: 15px; height: 15px; }
.terms-scroll { background: var(--panel-3); border: 1px solid var(--border-2); border-radius: 10px; padding: 12px; font-size: 11px; color: var(--text); max-height: 128px; overflow-y: auto; line-height: 1.6; }
.terms-scroll ul { padding-left: 18px; display: grid; gap: 4px; margin-top: 6px; }
.terms-check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 12px; color: var(--text); }
.terms-check input { margin-top: 2px; width: 15px; height: 15px; accent-color: var(--emerald-strong); }
.form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding-top: 16px; border-top: 1px solid var(--border-2); }

/* ===================== AUTENTICACIÓN DE USUARIOS ===================== */
.modal-auth {
  position: relative;
  width: min(520px, 100%);
  background: var(--panel); border: 1px solid var(--border-2); border-radius: 18px;
  padding: 24px; box-shadow: var(--shadow-lg);
  display: grid; gap: 14px;
  margin: auto;
}
.auth-tabs { display: flex; gap: 6px; background: var(--panel-3); padding: 4px; border-radius: 12px; border: 1px solid var(--border); }
.auth-tab {
  flex: 1; background: none; border: 0; color: var(--muted);
  font-size: 12.5px; font-weight: 600; padding: 8px; border-radius: 9px;
}
.auth-tab:hover { color: var(--text); }
.auth-tab.active { background: var(--tint); color: var(--carder-green-dark); }
[data-theme="dark"] .auth-tab.active { color: #6ee7b7; }
.auth-form { display: grid; gap: 9px; }
.auth-form h3 { font-family: var(--font-display); color: var(--text); font-size: 16px; }
.auth-form .muted { margin-top: -6px; }
.btn-block-full { width: 100%; justify-content: center; padding: 11px; margin-top: 4px; }
.btn-google {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 10px;
  background: #fff; color: #1f2937; border: 1px solid var(--border);
  border: 0; border-radius: 11px;
  font-size: 13px; font-weight: 600; font-family: var(--font-sans);
}
.btn-google:hover { background: #f3f4f6; }
.btn-google svg { width: 17px; height: 17px; }

/* ===================== TOAST ===================== */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  z-index: 120; padding: 12px 22px;
  background: var(--tint-strong); color: var(--carder-green-dark);
  border: 1px solid var(--tint-border); border-radius: 13px;
  font-size: 13px; font-weight: 600;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.25s ease;
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ===================== LEAFLET OVERRIDES ===================== */
.leaflet-control-attribution { background: rgba(255, 255, 255, 0.85) !important; color: #55705f !important; font-size: 9px !important; }
[data-theme="dark"] .leaflet-control-attribution { background: rgba(0, 0, 0, 0.6) !important; color: #9aa3a7 !important; }
.leaflet-control-attribution a { color: var(--carder-green-dark) !important; }
[data-theme="dark"] .leaflet-control-attribution a { color: #6ee7b7 !important; }
.leaflet-bar a { background: #ffffff !important; color: var(--text) !important; border-color: var(--border-2) !important; }
.leaflet-bar a:hover { background: var(--panel-3) !important; }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 1024px) {
  .podium { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; }
  .podium-card.gold { transform: none; order: -1; }
  .rank-two, .conv-two { grid-template-columns: 1fr; }
  .lb-details { width: 330px; }
}
@media (max-width: 860px) {
  .main-nav { display: none; }
  .nav-burger { display: flex; }
  .mobile-nav.open { display: flex; }
  .header-inner { height: 58px; }
  .hero-frame { height: 320px; padding: 18px; }
  .lb-body { flex-direction: column; }
  .lb-details { width: 100%; border-left: 0; border-top: 1px solid var(--tint-border); max-height: 45vh; }
  .lb-stage { padding: 14px; }
  .lb-img-wrap img { max-height: 50vh; }
  .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
  .span-2 { grid-column: span 2; }
  .criteria-grid { grid-template-columns: 1fr; }
  .map-controls { width: 100%; }
  .search-wrap.small { flex: 1; }
  .hide-sm { display: none; }
  .hotspots-drawer { width: calc(100% - 32px); }
  .map-legend { display: none; }
  .reel-card { width: 300px; }
}
@media (max-width: 560px) {
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .span-2 { grid-column: span 2; }
  .span-3 { grid-column: span 1; }
  .header-actions .btn span { display: none; }
  .btn-sm-header { padding: 5px 8px; }
  .reel-card { width: 84vw; }
  .modal-body { max-height: none; }
  .gallery-head { flex-wrap: wrap; }
  .banner-mine { flex-direction: column; align-items: flex-start; }
}

/* =====================================================================
   TERRITORIO CARDER — EXPERIENCIA EDITORIAL / FEED FOTOGRÁFICO
   ===================================================================== */
:root {
  --territory-ink: #07140d;
  --territory-deep: #0b2216;
  --territory-paper: #f5f2e9;
  --territory-moss: #c6df70;
  --territory-gold: #c8a75b;
}

::selection { background: var(--territory-moss); color: var(--territory-ink); }
*:focus-visible { outline: 3px solid var(--territory-moss); outline-offset: 3px; }
html { scrollbar-color: #557442 var(--territory-deep); }

body.territorio-home { background: var(--territory-paper); color: #193023; }
body.territorio-home .site-header {
  position: fixed; inset: 0 0 auto; z-index: 90; height: 82px;
  border: 0; background: linear-gradient(to bottom, rgba(0, 0, 0, .72), rgba(0, 0, 0, 0));
  backdrop-filter: none; transition: background .35s ease, box-shadow .35s ease;
}
body.territorio-home .site-header.is-scrolled,
body.territorio-home .site-header.is-solid {
  background: rgba(7, 20, 13, .95); backdrop-filter: blur(16px); box-shadow: 0 8px 28px rgba(0,0,0,.22);
}
body.territorio-home .header-inner { height: 82px; max-width: 1440px; }
body.territorio-home .brand-logo { height: 48px; border: 0; padding: 0; background: #fff; }
body.territorio-home .brand-name { color: #fff; font-family: var(--font-serif); font-size: 21px; font-weight: 600; }
body.territorio-home .brand-sub { color: #d8e99a; font-family: var(--font-sans); font-size: 10px; text-transform: uppercase; letter-spacing: .11em; }
body.territorio-home .nav-btn { color: rgba(255,255,255,.8); border-radius: 0; padding: 10px 13px; }
body.territorio-home .nav-btn:hover, body.territorio-home .nav-btn.active { color: #fff; background: transparent; }
body.territorio-home .nav-btn.active { box-shadow: inset 0 -1px 0 var(--territory-moss); }
body.territorio-home .nav-admin { color: #e8d094; }
body.territorio-home .theme-toggle { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.18); }
body.territorio-home .btn-outline { color: #fff; border-color: rgba(216,233,154,.85); background: rgba(0,0,0,.12); }
body.territorio-home .btn-outline:hover { color: var(--territory-ink); background: var(--territory-moss); }
body.territorio-home .btn-primary { color: #102514; background: var(--territory-moss); }
body.territorio-home .btn-primary:hover { background: #d9ee8d; }
body.territorio-home .user-btn { color: #fff; }
body.territorio-home .user-btn img { border-color: rgba(255,255,255,.42); }
.btn-google-header {
  min-height: 38px; padding: 8px 13px; border-radius: 999px;
  color: #1c2e22; background: #fff; border: 1px solid rgba(255,255,255,.72);
  box-shadow: 0 8px 20px rgba(0,0,0,.16);
}
.btn-google-header:hover { background: #eff4d7; transform: translateY(-1px); }
.btn-google-header svg { width: 16px; height: 16px; flex: 0 0 auto; }
.btn-google-header:disabled { cursor: not-allowed; opacity: .58; box-shadow: none; transform: none; }
.auth-google-status { margin: 0 0 14px; padding: 9px 10px; border-radius: 9px; color: #6c561f; background: #fff5d9; font-size: 11px; line-height: 1.45; }
.btn-google:disabled { cursor: not-allowed; opacity: .52; }

.hero-territory { position: relative; min-height: min(860px, 100svh); color: #fff; overflow: hidden; isolation: isolate; }
.territory-hero-media { position: absolute; inset: 0; z-index: -2; overflow: hidden; background: #0b2115; }
.territory-hero-image {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center;
  opacity: 0; transform: scale(1.015); transform-origin: center; backface-visibility: hidden;
  transition: opacity 1.8s cubic-bezier(.22,.61,.36,1), transform 12.2s cubic-bezier(.16,.7,.25,1);
  will-change: opacity, transform;
}
.territory-hero-image.is-active { opacity: 1; transform: scale(1.055); }
.territory-hero-shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(2,10,5,.87) 0%, rgba(2,10,5,.6) 36%, rgba(2,10,5,.09) 72%), linear-gradient(0deg, rgba(2,10,5,.52), transparent 50%); }
.territory-hero-content { min-height: min(860px, 100svh); display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding-top: 82px; }
.territory-hero-content > * { max-width: 34rem; }
.territory-hero-content h1 { font-family: var(--font-serif); font-size: clamp(3.4rem, 6.4vw, 6rem); line-height: .93; letter-spacing: -.045em; font-weight: 400; color: #fff; text-wrap: balance; }
.territory-hero-content h1 em { color: var(--territory-moss); font-weight: 400; }
.territory-hero-copy { max-width: 44ch; margin: 24px 0 29px; color: rgba(255,255,255,.9); font-size: clamp(1rem, 1.3vw, 1.13rem); line-height: 1.62; }
.territory-hero-actions { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.territory-cta { border-radius: 999px; background: var(--territory-moss); color: var(--territory-ink); padding: 14px 22px; font-weight: 800; }
.hero-text-link { appearance: none; border: 0; padding: 5px 0; background: transparent; color: #fff; font-size: 13px; border-bottom: 1px solid rgba(255,255,255,.65); }
.hero-scroll-cue { position: absolute; left: max(20px, calc((100vw - 1280px)/2 + 20px)); bottom: 28px; padding: 0; color: rgba(255,255,255,.85); background: transparent; border: 0; border-bottom: 1px solid rgba(255,255,255,.55); font-size: 11px; letter-spacing: .04em; }

.explore-intro { padding-top: 148px; padding-bottom: 34px; color: #193023; }
.explore-intro .section-label { margin-bottom: 13px; color: #60762f; font-size: 10px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.explore-intro h1 { max-width: 18ch; font: 400 clamp(2.8rem, 5vw, 5.25rem)/.93 var(--font-serif); letter-spacing: -.045em; }
.explore-intro > p:last-child { max-width: 49ch; margin-top: 16px; color: #5a6b5d; font-size: 14px; }

body.territorio-home .filter-bar { background: var(--territory-paper); border: 0; padding-block: 28px 16px; }
body.territorio-home .filter-inner { max-width: 1040px; }
body.territorio-home .search-wrap { border-color: #c9d0be; background: transparent; border-radius: 0; }
body.territorio-home .search-wrap input { color: #193023; }
body.territorio-home .btn-ghost, body.territorio-home .select-ghost { border-color: #c9d0be; color: #193023; background: transparent; border-radius: 0; }
body.territorio-home .gallery-head { max-width: 1040px; margin-inline: auto; border-top: 1px solid #d9decf; padding: 21px 20px 20px; }
body.territorio-home .gallery-count { font-family: var(--font-serif); color: #193023; font-size: 22px; }
body.territorio-home .view-switch { border-radius: 0; background: transparent; }
body.territorio-home .view-btn { border-radius: 0; color: #647060; }
body.territorio-home .view-btn.active { background: transparent; color: #193023; box-shadow: inset 0 -1px #193023; }

body.territorio-home .site-footer {
  margin-top: 0; padding: clamp(32px, 5vw, 60px) 0 26px;
  color: rgba(239,245,223,.78); background: #07140d; border-top: 1px solid rgba(215,233,149,.18);
}
body.territorio-home .footer-top { gap: 30px; padding-bottom: 25px; border-bottom-color: rgba(215,233,149,.2); }
body.territorio-home .footer-brand h3 { color: #fff; }
body.territorio-home .footer-brand p, body.territorio-home .footer-links button, body.territorio-home .footer-bottom { color: rgba(239,245,223,.7); }
body.territorio-home .footer-brand p, body.territorio-home .footer-links a { color: rgba(239,245,223,.7); }
body.territorio-home .footer-links button:hover, body.territorio-home .footer-links a:hover { color: var(--territory-moss); }
body.territorio-home .footer-links #btnFooterUpload { color: #d9ed8d; }

/* ===================== DOCUMENTOS LEGALES ===================== */
body.legal-page { min-height: 100vh; }
.legal-header { color: #f4f7e8; background: #07140d; border-bottom: 1px solid rgba(215,233,149,.18); }
.legal-header-inner { min-height: 80px; display: flex; align-items: center; justify-content: space-between; gap: 22px; }
.legal-brand { display: inline-flex; align-items: center; gap: 11px; min-width: 0; }
.legal-brand img { width: 34px; height: 52px; object-fit: contain; padding: 2px; border-radius: 7px; background: #fff; }
.legal-brand span { display: grid; gap: 1px; }
.legal-brand strong { font: 600 15px/1.2 var(--font-display); letter-spacing: -.02em; }
.legal-brand small { color: rgba(239,245,223,.68); font-size: 10px; }
.legal-back { display: inline-flex; align-items: center; gap: 8px; color: #d9ed8d; font-size: 12px; font-weight: 700; }
.legal-back:hover { color: #fff; }
.legal-back span, .legal-switch span { transition: transform .24s ease; }
.legal-back:hover span, .legal-switch a:hover span { transform: translateX(3px); }
.legal-main { flex: 1; background: var(--bg); padding: clamp(62px, 9vw, 120px) 0 clamp(70px, 10vw, 128px); }
.legal-layout { width: min(960px, 100%); }
.legal-heading { max-width: 800px; margin-bottom: clamp(40px, 6vw, 74px); }
.legal-heading h1 { max-width: 14ch; color: var(--text); font: 400 clamp(3rem, 6.2vw, 5.75rem)/.93 var(--font-serif); letter-spacing: -.045em; text-wrap: balance; }
.legal-heading > span { display: block; margin-top: 18px; color: var(--muted); font-size: 12px; }
.legal-document { max-width: 760px; border-top: 1px solid var(--border-2); padding-top: 31px; }
.legal-document h2 { margin: 38px 0 12px; color: var(--text); font: 600 clamp(1.35rem, 2.2vw, 1.75rem)/1.15 var(--font-serif); letter-spacing: -.02em; }
.legal-document h2:first-child { margin-top: 0; }
.legal-document h2 span { color: var(--emerald-strong); }
.legal-document p { max-width: 73ch; color: var(--muted); font-size: 15px; line-height: 1.8; }
.legal-document p + p { margin-top: 18px; }
.legal-switch { max-width: 760px; margin-top: 58px; padding-top: 22px; border-top: 1px solid var(--border-2); }
.legal-switch a { display: inline-flex; gap: 9px; align-items: center; color: var(--emerald-strong); font-size: 13px; font-weight: 800; }
.legal-footer { margin-top: 0; color: rgba(239,245,223,.78); background: #07140d; border-top-color: rgba(215,233,149,.18); }
.legal-footer .footer-bottom { padding-top: 0; color: rgba(239,245,223,.68); }
.legal-footer .footer-links a { color: rgba(239,245,223,.68); }
.legal-footer .footer-links a:hover { color: #d9ed8d; }
.terms-check a { color: var(--emerald-strong); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }

/* ===================== CATEGORÍAS + CARGA MULTIFOTO ===================== */
.category-switch { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.category-chip { border: 1px solid #c9d0be; background: transparent; color: #526456; border-radius: 999px; padding: 9px 15px; font-size: 12px; transition: background .18s, color .18s, border-color .18s; }
.category-chip:hover, .category-chip.active { background: #193023; border-color: #193023; color: #edf5df; }
.upload-mode-switch { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--border-2); border-radius: 11px; background: var(--panel-3); }
.upload-mode { border: 0; border-radius: 8px; padding: 7px 13px; background: transparent; color: var(--muted); font-size: 11px; font-weight: 700; }
.upload-mode.active { background: var(--panel); color: var(--emerald-strong); box-shadow: 0 1px 3px rgba(16,44,28,.12); }
.upload-mode-label { color: var(--muted); font-size: 11px; font-weight: 700; }
.batch-queue-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; margin-bottom: 12px; text-align: left; }
.batch-queue-head strong { color: var(--text); font-size: 13px; }
.batch-queue-head span { color: var(--muted); font-size: 11px; }
.batch-queue { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; text-align: left; }
.batch-item { position: relative; min-height: 108px; overflow: hidden; border: 1px solid var(--input-border); border-radius: 10px; background: var(--panel); cursor: pointer; text-align: left; }
.batch-item.active { border-color: var(--emerald); box-shadow: 0 0 0 2px var(--tint-strong); }
.batch-item.done::after { content: '✓'; position: absolute; top: 5px; right: 5px; width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; background: var(--emerald); color: #fff; font-size: 11px; font-weight: 800; }
.batch-item img { width: 100%; height: 72px; object-fit: cover; background: #122018; }
.batch-item span { display: block; overflow: hidden; padding: 5px 7px; color: var(--text); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.batch-editor-note { display: flex; align-items: center; gap: 8px; padding: 9px 11px; border: 1px solid var(--tint-border); border-radius: 10px; background: var(--tint); color: var(--muted); font-size: 11px; }
.batch-editor-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--emerald); flex: 0 0 auto; }
.content-category-select { max-width: 300px; }
.gallery-assignment { display: grid; grid-template-columns: 1fr minmax(250px, 340px); align-items: end; gap: 18px; padding: 15px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.gallery-assignment-controls { display: flex; gap: 8px; }
.gallery-assignment-controls select { flex: 1; }
.mobile-auth-dock { display: none; }
.auth-sheet { position: fixed; inset: 0; z-index: 110; display: grid; align-items: end; background: rgba(3,15,8,.42); backdrop-filter: blur(4px); }
.auth-sheet-card { position: relative; width: min(420px, 100%); padding: 28px 24px 22px; border: 1px solid rgba(215,233,149,.24); border-bottom: 0; border-radius: 20px 20px 0 0; background: #f7f5ed; color: #193023; box-shadow: 0 -16px 50px rgba(0,0,0,.22); }
.auth-sheet-card h2 { margin: 12px 0 8px; font: 400 30px/1 var(--font-serif); }
.auth-sheet-card p { max-width: 36ch; color: #5c6c60; font-size: 13px; }
.auth-sheet-card small { display: block; margin-top: 12px; color: #647060; font-size: 10px; line-height: 1.5; }
.photo-edit-card { width: min(660px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--panel); border: 1px solid var(--border-2); border-radius: 18px; box-shadow: var(--shadow-lg); }
.locked-license { display: grid; gap: 3px; padding: 12px 14px; border: 1px dashed var(--border-2); border-radius: 11px; background: var(--panel-3); }
.locked-license span, .locked-license small { color: var(--muted); font-size: 11px; }
.locked-license strong { color: var(--text); font-size: 13px; }
.feed-edit { position: absolute; right: 10px; bottom: 10px; z-index: 3; border: 1px solid rgba(255,255,255,.3); border-radius: 8px; padding: 6px 9px; background: rgba(7,20,13,.82); color: #edf5df; font-size: 10px; font-weight: 700; }
.feed-edit:hover { background: #193023; }
.google-mark { display: inline-grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; background: #fff; color: #4285f4; font: 800 17px Arial, sans-serif; box-shadow: inset 0 0 0 1px #d9e0e8; }
.google-mark.large { width: 38px; height: 38px; font-size: 25px; }
.btn-google-sheet { width: 100%; margin-top: 18px; background: #1a73e8; color: #fff; border-color: #1a73e8; }
.btn-google-sheet:hover { background: #155fc0; }

@media (max-width: 560px) {
  .category-switch { margin-top: 16px; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 3px; }
  .category-chip { flex: 0 0 auto; padding-inline: 13px; }
  .batch-queue { grid-template-columns: repeat(4, 1fr); }
  .gallery-assignment { grid-template-columns: 1fr; gap: 10px; }
  .gallery-assignment-controls { flex-direction: column; }
  .mobile-auth-dock { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 48; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 11px; border: 1px solid rgba(215,233,149,.25); border-radius: 15px; background: rgba(7,20,13,.94); box-shadow: 0 10px 28px rgba(0,0,0,.22); }
  .mobile-auth-copy { display: flex; align-items: center; gap: 8px; min-width: 0; color: #edf5df; }
  .mobile-auth-copy span:last-child { display: grid; gap: 1px; min-width: 0; }
  .mobile-auth-copy strong { font-size: 11px; }
  .mobile-auth-copy small { color: rgba(239,245,223,.7); font-size: 9px; white-space: nowrap; }
  .btn-google-mobile { flex: 0 0 auto; padding: 8px 11px; background: #1a73e8; border-color: #1a73e8; color: #fff; font-size: 10px; }
  .site-footer { padding-bottom: 92px; }
}

@media (max-width: 560px) {
  .legal-header-inner { min-height: 70px; }
  .legal-brand img { width: 28px; height: 43px; }
  .legal-brand strong { font-size: 13px; }
  .legal-brand small { display: none; }
  .legal-back { font-size: 11px; }
  .legal-main { padding-top: 56px; }
  .legal-document p { font-size: 14px; line-height: 1.75; }
  .legal-footer .footer-bottom { align-items: flex-start; }
}

body.territorio-home #view-mapa { margin-top: 82px; height: calc(100svh - 82px); min-height: calc(100svh - 82px); }
body.territorio-home .map-toolbar { position: relative; z-index: 2; }
body.territorio-home .map-title-row h2 { color: #193023; }
@media (max-width: 1180px) {
  .map-controls { width: 100%; }
  .map-controls .search-wrap.small { flex: 1 1 240px; min-width: 200px; }
}

.photo-feed { width: min(820px, calc(100% - 40px)); margin: 0 auto 110px; display: grid; gap: 52px; }
.photo-feed-grid { width: min(1240px, calc(100% - 40px)); grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feed-post { cursor: pointer; background: transparent; animation: feed-enter .5s both; }
.feed-visual { position: relative; overflow: hidden; background: #13261a; aspect-ratio: 1.36 / 1; }
.feed-visual img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.2,.75,.2,1); }
.feed-post:hover .feed-visual img { transform: scale(1.025); }
.feed-author { position: absolute; left: 18px; top: 18px; display: flex; align-items: center; gap: 10px; color: #fff; text-align: left; opacity: 0; transform: translateY(-6px); transition: opacity .25s ease, transform .25s ease; }
.feed-post:hover .feed-author, .feed-post:focus-within .feed-author { opacity: 1; transform: translateY(0); }
.feed-avatar { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(255,255,255,.85); background: #1f3c28; color: #fff; font-family: var(--font-serif); font-size: 18px; }
.feed-author-name { display: grid; gap: 1px; padding: 0; background: transparent; border: 0; color: #fff; text-align: left; text-shadow: 0 2px 12px #000; }
.feed-author-name span { font-size: 11px; opacity: .9; }
.feed-selection { position: absolute; right: 16px; bottom: 16px; color: #e3f09f; font-size: 10px; text-transform: uppercase; letter-spacing: .1em; font-weight: 800; text-shadow: 0 1px 12px #000; }
.feed-caption { display: flex; justify-content: space-between; align-items: start; gap: 20px; padding: 15px 1px 0; }
.feed-caption h3 { font-family: var(--font-serif); font-size: 21px; line-height: 1.1; font-weight: 500; color: #193023; }
.feed-species { font-size: 12px; color: #65745e; font-style: italic; margin-bottom: 4px; }
.photo-feed-grid .feed-caption { display: none; }
.photo-feed-grid .feed-post { aspect-ratio: 1; overflow: hidden; }
.photo-feed-grid .feed-visual { height: 100%; aspect-ratio: auto; }
@keyframes feed-enter { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

.photographer-profile { background: var(--territory-paper); min-height: 100vh; padding-top: 0; }
.profile-loading, .profile-empty { min-height: 65vh; display: grid; place-content: center; text-align: center; gap: 14px; padding: 40px; }
.profile-empty h2 { font: 400 clamp(2.7rem, 5vw, 5.5rem)/.9 var(--font-serif); color: #193023; }
.profile-empty p { max-width: 45ch; color: #5c6c60; }
.photographer-cover { position: relative; min-height: 390px; padding: 120px 0 48px; color: #fff; background: linear-gradient(90deg, rgba(3,15,8,.92), rgba(3,15,8,.55)), url('../../assets/img/hero-territorio-carder.png') center / cover; }
.photographer-cover-inner { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 28px; align-items: center; }
.photographer-avatar { width: 142px; height: 142px; object-fit: cover; border-radius: 50%; border: 2px solid #d5e78e; background: #143c29; }
.photographer-avatar--initials { display: grid; place-items: center; color: #e9f1c8; font: 400 48px/1 var(--font-serif); }
.photographer-intro h1 { font: 400 clamp(2.7rem, 5vw, 5rem)/.92 var(--font-serif); letter-spacing: -.04em; }
.photographer-role { margin-top: 8px; font-size: 17px; color: #e5eece; }
.photographer-place { margin-top: 9px; font-size: 13px; }
.photographer-bio { max-width: 58ch; margin-top: 18px; color: rgba(255,255,255,.86); }
.photographer-intro a { display: inline-block; margin-top: 14px; color: #d7e995; border-bottom: 1px solid currentColor; }
.photographer-actions { align-self: start; }
.profile-stats { grid-column: 2 / 4; display: flex; gap: 40px; margin-top: -10px; }
.profile-stats div { display: grid; gap: 3px; }
.profile-stats dt { color: #d7e995; font: 400 34px/1 var(--font-serif); }
.profile-stats dd { margin: 0; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: rgba(255,255,255,.75); }
.profile-gallery-section { padding-block: 70px 110px; }
.profile-gallery-head { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; margin-bottom: 28px; border-bottom: 1px solid #ccd4c3; padding-bottom: 16px; }
.profile-gallery-head h2 { color: #193023; font: 400 clamp(2.4rem, 4vw, 4.5rem)/.9 var(--font-serif); letter-spacing: -.04em; }
.profile-gallery-head p { color: #647060; max-width: 38ch; font-size: 12px; }
.profile-gallery { display: grid; grid-template-columns: repeat(12, 1fr); gap: 14px; }
.profile-photo { min-height: 190px; padding: 0; overflow: hidden; border: 0; background: #233b2a; cursor: pointer; position: relative; }
.profile-photo:nth-child(5n + 1) { grid-column: span 5; grid-row: span 2; }
.profile-photo:nth-child(5n + 2), .profile-photo:nth-child(5n + 3) { grid-column: span 3; }
.profile-photo:nth-child(5n + 4) { grid-column: span 4; grid-row: span 2; }
.profile-photo:nth-child(5n) { grid-column: span 3; }
.profile-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.profile-photo:hover img { transform: scale(1.04); }
.profile-photo span { position: absolute; inset: auto 0 0; padding: 26px 12px 10px; color: #fff; text-align: left; font: 16px var(--font-serif); background: linear-gradient(transparent, rgba(0,0,0,.76)); opacity: 0; transition: opacity .2s ease; }
.profile-photo:hover span { opacity: 1; }

.modal-profile { position: relative; width: min(720px, calc(100vw - 32px)); max-height: min(740px, calc(100vh - 32px)); overflow: auto; background: #f7f5ed; border-radius: 16px; padding: clamp(28px, 5vw, 58px); box-shadow: 0 25px 80px rgba(0,0,0,.4); }
.modal-profile h2 { color: #173021; font: 400 clamp(2.4rem, 5vw, 4.6rem)/.9 var(--font-serif); letter-spacing: -.04em; max-width: 15ch; }
.modal-profile > div > .muted, .modal-profile form > .muted { margin-top: 16px; max-width: 54ch; }
.profile-type-choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 32px; }
.profile-type-choice { min-height: 220px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 18px; color: #183123; text-align: left; background: transparent; border: 1px solid #c6d0bc; border-radius: 14px; transition: transform .2s ease, background .2s ease, border-color .2s ease; }
.profile-type-choice:hover { transform: translateY(-4px); background: #eaf0d6; border-color: #829551; }
.profile-type-choice strong { font: 400 25px/1 var(--font-serif); }
.profile-type-choice > span:not(.profile-type-icon) { color: #5c6c60; font-size: 12px; line-height: 1.45; }
.profile-type-choice small { margin-top: auto; color: #647923; font-weight: 800; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.profile-type-icon { width: 28px; height: 28px; display: block; border: 1px solid #829551; border-radius: 50% 50% 50% 8%; background: #244c30; box-shadow: inset 8px 8px 0 #d9ef8b; transform: rotate(-24deg); }
.profile-dynamic-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 26px 0; }
.profile-dynamic-fields .dynamic-field:has(textarea) { grid-column: 1 / -1; }
.dynamic-field { display: grid; gap: 6px; }
.dynamic-upload-section { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding-block: 22px; }
.license-choice { display: grid; gap: 6px; margin-top: 16px; }
#authorLegacyFields { display: none; }

@media (max-width: 860px) {
  body.territorio-home .site-header, body.territorio-home .header-inner { height: 64px; }
  body.territorio-home .brand-name { font-size: 17px; }
  body.territorio-home #view-mapa { margin-top: 64px; height: calc(100svh - 64px); min-height: calc(100svh - 64px); }
  .territory-hero-content { min-height: 760px; padding-top: 64px; }
  .photographer-cover-inner { grid-template-columns: auto 1fr; }
  .photographer-actions { grid-column: 2; grid-row: 1; justify-self: end; }
  .profile-stats { grid-column: 1 / -1; margin-top: 0; }
  .profile-gallery { grid-template-columns: repeat(2, 1fr); }
  .profile-photo, .profile-photo:nth-child(n) { grid-column: span 1; grid-row: auto; min-height: 230px; }
}
@media (max-width: 560px) {
  .territory-hero-image { object-position: 63% center; }
  .territory-hero-shade { background: linear-gradient(90deg, rgba(2,10,5,.86), rgba(2,10,5,.28)), linear-gradient(0deg, rgba(2,10,5,.55), transparent 55%); }
  .territory-hero-content { min-height: max(680px, 100svh); padding-top: 64px; }
  .territory-hero-content h1 { font-size: clamp(3.15rem, 14vw, 4.65rem); }
  .hero-scroll-cue { left: 20px; bottom: 22px; }
  .explore-intro { padding-top: 108px; padding-bottom: 23px; }
  .btn-google-header { padding: 8px 10px; }
  .photo-feed { width: calc(100% - 28px); gap: 36px; }
  .photo-feed-grid { gap: 6px; grid-template-columns: repeat(2, 1fr); }
  .feed-author { opacity: 1; transform: none; left: 12px; top: 12px; }
  .feed-caption h3 { font-size: 19px; }
  .profile-type-choices, .profile-dynamic-fields { grid-template-columns: 1fr; }
  .profile-dynamic-fields .dynamic-field:has(textarea) { grid-column: auto; }
  .modal-profile { padding: 30px 22px; }
  .photographer-cover { padding-top: 106px; }
  .photographer-cover-inner { grid-template-columns: 1fr; gap: 18px; }
  .photographer-avatar { width: 104px; height: 104px; }
  .photographer-actions { grid-column: auto; grid-row: auto; justify-self: start; }
  .profile-stats { grid-column: auto; gap: 24px; }
  .profile-gallery-head { align-items: start; flex-direction: column; }
  .profile-gallery { gap: 6px; }
  .profile-photo, .profile-photo:nth-child(n) { min-height: 145px; }
}

/* =====================================================================
   AJUSTE UX/UI — superficies claras, lectura y acciones de autor
   ===================================================================== */
body.is-light-view {
  background: #f6f8f4;
  color: #193023;
}
body.is-light-view .site-main { background: #f6f8f4; }
body.is-light-view .explore-intro {
  max-width: 1100px;
  margin-inline: auto;
  padding: clamp(74px, 8vw, 104px) 20px 22px;
}
body.is-light-view .explore-intro h1 {
  max-width: 14ch;
  font-size: clamp(2.5rem, 4.7vw, 4.35rem);
  line-height: .96;
}
body.is-light-view .filter-bar {
  background: #f6f8f4;
  border: 0;
  padding-block: 10px 18px;
}
body.is-light-view .filter-inner { max-width: 1100px; }
body.is-light-view .search-wrap {
  background: #edf2ed;
  border: 1px solid #c9d6ca;
  border-radius: 12px;
}
body.is-light-view .search-wrap input { color: #193023; }
body.is-light-view .search-wrap input::placeholder { color: #6a7c70; opacity: 1; }
body.is-light-view .gallery-head {
  max-width: 1100px;
  margin: 16px auto 26px;
  padding: 20px;
  border-top: 1px solid #d7e0d5;
}
body.is-light-view .gallery-count { color: #193023; font-size: 21px; }
body.is-light-view .photo-feed-grid {
  width: min(1100px, calc(100% - 40px));
  gap: 22px 18px;
}
body.is-light-view .photo-feed-grid .feed-post {
  aspect-ratio: auto;
  overflow: visible;
}
body.is-light-view .photo-feed-grid .feed-visual {
  height: auto;
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(38, 65, 45, .10);
}
body.is-light-view .photo-feed-grid .feed-caption {
  display: flex;
  padding: 12px 2px 0;
}
body.is-light-view .feed-caption h3 { color: #193023; font-size: 18px; }
body.is-light-view .feed-species { color: #55705f; }
body.is-light-view .feed-author {
  top: 12px;
  left: 12px;
  right: 12px;
  opacity: 1;
  transform: none;
  padding: 8px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(8, 24, 15, .74), transparent);
}
body.is-light-view .feed-avatar { text-decoration: none; }
body.is-light-view .feed-author-name { color: #edf5df; text-decoration: none; }
body.is-light-view .site-footer {
  color: #627366;
  background: #eef3ed;
  border-top: 1px solid #d7e0d5;
}
body.is-light-view .footer-brand h3 { color: #193023; }
body.is-light-view .footer-brand p,
body.is-light-view .footer-links button,
body.is-light-view .footer-links a,
body.is-light-view .footer-bottom { color: #627366; }
body.is-light-view .footer-links button:hover,
body.is-light-view .footer-links a:hover { color: #28794a; }
body.is-light-view .conv-hero {
  background: #e7f1e6;
  border-color: #bdd0bf;
  box-shadow: 0 16px 36px rgba(38, 65, 45, .10);
}
body.is-light-view .conv-hero h1 { color: #193023; }
body.is-light-view .conv-hero p { color: #4d6554; }
body.is-light-view .conv-free { color: #28794a; }
body.is-light-view .rank-table td { border-bottom-color: #d7e0d5; }

/* El mapa comunica primero el punto: la ficha se abre sobre el indicador. */
body.is-light-view #view-mapa {
  margin-top: 82px;
  height: calc(100svh - 82px);
  min-height: 560px;
}
body.is-light-view .map-toolbar { background: #ffffff; border-bottom-color: #d7e0d5; }
body.is-light-view .map-title-row h2,
body.is-light-view .map-title p { color: #193023; }
body.is-light-view .map-title p { color: #627366; }
body.is-light-view .map-controls .search-wrap,
body.is-light-view .map-controls select,
body.is-light-view .layer-switch {
  background: #f6f8f4;
  border-color: #c9d6ca;
  color: #193023;
}
body.is-light-view .map-controls input::placeholder,
body.is-light-view .map-controls select { color: #627366; opacity: 1; }
.photo-map-popup .leaflet-popup-content-wrapper,
.photo-map-popup .leaflet-popup-tip { background: #fbfcf8; }
.photo-map-popup .leaflet-popup-content { margin: 0; width: 280px !important; }
.map-photo-popup { position: relative; overflow: hidden; color: #193023; border-radius: 13px; }
.map-popup-media { display: flex; align-items: center; justify-content: center; min-height: 158px; max-height: 220px; overflow: hidden; background: #173023; }
.map-popup-media img { display: block; width: auto; max-width: 100%; height: auto; max-height: 220px; object-fit: contain; object-position: center; }
.map-popup-body { display: grid; gap: 6px; padding: 12px; }
.map-popup-place {
  width: fit-content;
  color: #28794a;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.map-popup-body h3 { color: #193023; font: 500 19px/1.05 var(--font-serif); }
.map-popup-species { color: #55705f; font: italic 13px/1.2 var(--font-serif); }
.map-popup-location { color: #627366; font-size: 11px; }
.map-popup-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 9px; border-top: 1px solid #d7e0d5; }
.map-popup-author { min-width: 0; overflow: hidden; color: #28794a; font-size: 11px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.map-popup-actions { display: flex; align-items: center; gap: 7px; }
.map-popup-actions .like-btn { color: #28794a; }
.map-popup-close { position: absolute; z-index: 2; top: 8px; right: 8px; width: 28px; height: 28px; border: 0; border-radius: 50%; color: #193023; background: rgba(251, 252, 248, .88); font-size: 19px; line-height: 1; }
.map-popup-close:hover { background: #ffffff; }

/* Formularios legibles incluso cuando el home conserva el tema oscuro. */
.modal-profile {
  width: min(760px, calc(100vw - 28px));
  max-height: min(720px, calc(100svh - 28px));
  color: #193023;
  background: #fbfcf8;
  scrollbar-width: thin;
  scrollbar-color: #aebcab transparent;
}
.modal-profile h2 { font-size: clamp(2.25rem, 5vw, 4.1rem); line-height: .94; }
.modal-profile > div > .muted,
.modal-profile form > .muted { color: #627366; }
.profile-type-choices { gap: 14px; margin-top: 26px; }
.profile-type-choice { min-height: 190px; padding: 16px; background: #fbfcf8; }
.profile-type-choice strong { font-size: 22px; }
.profile-type-choice > span:not(.profile-type-icon) { color: #5e7162; }
.profile-dynamic-fields { gap: 16px; margin: 22px 0; }
.modal-profile .dynamic-field .flabel { color: #526456 !important; }
.modal-profile input,
.modal-profile textarea,
.modal-profile select { color: #193023; background: #ffffff; border-color: #c9d6ca; }
.modal-profile input::placeholder,
.modal-profile textarea::placeholder { color: #829187; opacity: 1; }
.modal-profile .form-actions { background: #fbfcf8; }
.lb-author-link { padding: 0; border: 0; background: transparent; color: #193023; font: 600 12px/1.3 var(--font-sans); text-align: left; cursor: pointer; }
.lb-author-link:hover { color: #28794a; text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 860px) {
  body.is-light-view #view-mapa { margin-top: 64px; height: calc(100svh - 64px); }
  body.is-light-view .photo-feed-grid { gap: 16px 12px; }
}
@media (max-width: 560px) {
  body.is-light-view .explore-intro { padding-top: 88px; }
  body.is-light-view .photo-feed-grid { width: calc(100% - 28px); gap: 18px 10px; }
  body.is-light-view .photo-feed-grid .feed-visual { border-radius: 10px; }
  .photo-map-popup .leaflet-popup-content { width: min(280px, calc(100vw - 72px)) !important; }
}

/* =====================================================================
   EXPLORAR — JERARQUÍA EDITORIAL Y SUPERFICIES PLANAS
   ===================================================================== */
body.is-light-view .explore-intro {
  width: min(1100px, calc(100% - 40px));
  max-width: none;
  margin: 0 auto;
  padding: clamp(52px, 6vw, 76px) 0 18px;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

body.is-light-view .explore-intro h1 {
  max-width: 16ch;
  margin: 0;
  font-size: clamp(2.55rem, 4.6vw, 4.3rem);
  line-height: .96;
}

body.is-light-view .explore-intro > p:last-child {
  margin-top: 14px;
}

body.is-light-view .filter-bar {
  box-shadow: none;
  backdrop-filter: none;
}

body.is-light-view .filter-inner {
  width: min(1100px, calc(100% - 40px));
  max-width: none;
  padding-inline: 0;
}

body.is-light-view .gallery-head {
  width: min(1100px, calc(100% - 40px));
  max-width: none;
  margin: 18px auto 24px;
  padding: 14px 0 13px;
  border-top: 1px solid #d7e0d5;
  border-bottom: 1px solid #d7e0d5;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

body.is-light-view .gallery-count {
  font-size: 20px;
  letter-spacing: -.015em;
}

body.is-light-view .view-switch {
  padding: 2px;
  background: transparent;
  border: 0;
  border-radius: 0;
}

body.is-light-view .view-btn {
  min-height: 32px;
  border-radius: 4px;
}

body.is-light-view .photo-feed-grid {
  width: min(1100px, calc(100% - 40px));
  gap: 24px 18px;
}

body.is-light-view .photo-feed-grid .feed-visual {
  border: 1px solid rgba(25, 48, 35, .08);
  border-radius: 8px;
  box-shadow: none;
}

body.is-light-view .photo-feed-grid .feed-post:hover .feed-visual {
  box-shadow: none;
}

@media (max-width: 560px) {
  body.is-light-view .explore-intro,
  body.is-light-view .filter-inner,
  body.is-light-view .gallery-head,
  body.is-light-view .photo-feed-grid {
    width: calc(100% - 28px);
  }

  body.is-light-view .explore-intro {
    padding: 44px 0 14px;
  }

  body.is-light-view .gallery-head {
    margin: 14px auto 18px;
    padding: 12px 0;
    gap: 12px;
  }

  body.is-light-view .gallery-count {
    font-size: 18px;
  }

  body.is-light-view .photo-feed-grid {
    gap: 18px 10px;
  }
}

/* =====================================================================
   COMPACTACIÓN, MODAL DE PERFIL Y VISTA SCROLL
   ===================================================================== */
body.territorio-home .header-actions { gap: 6px; }
body.territorio-home .btn-google-header {
  min-height: 34px;
  padding: 7px 11px;
  border-radius: 10px;
  box-shadow: none;
  font-size: 11px;
}
body.territorio-home .btn-google-header svg { width: 14px; height: 14px; }
body.territorio-home .user-btn { padding: 3px 4px; gap: 4px; }
body.territorio-home .user-btn img { width: 30px; height: 30px; }
body.territorio-home .user-btn .user-account-icon { width: 28px; height: 28px; }
body.territorio-home .user-btn > svg:last-child { width: 11px; height: 11px; }
body.territorio-home .theme-toggle { width: 32px; height: 32px; }

.modal-profile {
  width: min(640px, calc(100vw - 28px));
  max-height: min(660px, calc(100svh - 28px));
  padding: clamp(24px, 4vw, 38px);
  border-radius: 18px;
}
.modal-profile h2 {
  max-width: 12ch;
  font-size: clamp(2rem, 4.4vw, 3.7rem);
  letter-spacing: -.035em;
}
.modal-profile > div > .muted,
.modal-profile form > .muted { margin-top: 11px; font-size: 12px; line-height: 1.55; }
.profile-type-choices { gap: 10px; margin-top: 22px; }
.profile-type-choice {
  min-height: 164px;
  gap: 9px;
  padding: 14px;
  border-radius: 13px;
}
.profile-type-choice strong { font-size: 20px; line-height: 1.05; }
.profile-type-choice > span:not(.profile-type-icon) { font-size: 11px; line-height: 1.4; }
.profile-type-choice small { font-size: 9px; letter-spacing: .06em; }
.profile-type-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid #9bb56e;
  border-radius: 11px;
  background: #e8f1d4;
  box-shadow: none;
  transform: none;
}
.profile-type-icon svg { width: 21px; height: 21px; fill: none; stroke: #356a3f; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.profile-type-icon--professional { background: #e2edf0; border-color: #a9c5c6; }
.profile-type-icon--professional svg { stroke: #25666a; }
.profile-type-icon--visitor { background: #f1ead6; border-color: #d4c18a; }
.profile-type-icon--visitor svg { stroke: #8a6b2a; }
.profile-dynamic-fields { gap: 12px; margin: 18px 0; }
.modal-profile .dynamic-field { gap: 5px; }
.modal-profile .dynamic-field .flabel { font-size: 10px; letter-spacing: .02em; }
.modal-profile input,
.modal-profile textarea,
.modal-profile select {
  min-height: 40px;
  padding: 9px 11px;
  border-radius: 10px;
  font-size: 12px;
  box-shadow: inset 0 0 0 1px rgba(38, 76, 48, .02);
}
.modal-profile textarea { min-height: 78px; }
.modal-profile .form-actions { gap: 8px; padding-top: 12px; }
.modal-profile .form-actions .btn { min-height: 36px; padding: 8px 13px; font-size: 11px; }
.auth-sheet-card { padding: 22px 20px 18px; }
.auth-sheet-card h2 { margin: 10px 0 7px; font-size: 26px; }
.auth-sheet-card p { font-size: 12px; }
.auth-sheet-card small { margin-top: 10px; font-size: 9px; }

/* Vista vertical: una fotografía protagonista por gesto, con anclaje suave. */
body.is-light-view .photo-scroll-feed {
  width: min(680px, calc(100% - 40px));
  margin: 0 auto 90px;
  gap: 20px;
  scroll-snap-type: y proximity;
  scroll-behavior: smooth;
  overscroll-behavior-y: contain;
}
body.is-light-view .photo-scroll-feed .feed-post {
  position: relative;
  display: grid;
  grid-template-rows: 1fr;
  min-height: min(720px, calc(100svh - 148px));
  overflow: hidden;
  border-radius: 18px;
  background: #173023;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  box-shadow: 0 16px 34px rgba(38, 65, 45, .13);
}
body.is-light-view .photo-scroll-feed .feed-visual {
  height: 100%;
  min-height: min(720px, calc(100svh - 148px));
  aspect-ratio: auto;
  border-radius: 0;
}
body.is-light-view .photo-scroll-feed .feed-visual::after {
  content: '';
  position: absolute;
  inset: 35% 0 0;
  pointer-events: none;
  background: linear-gradient(to bottom, transparent, rgba(7, 20, 13, .82));
}
body.is-light-view .photo-scroll-feed .feed-caption {
  position: absolute;
  z-index: 2;
  inset: auto 16px 15px;
  align-items: end;
  padding: 0;
  color: #edf5df;
}
body.is-light-view .photo-scroll-feed .feed-caption h3 { color: #edf5df; font-size: 23px; }
body.is-light-view .photo-scroll-feed .feed-species { color: #d6e99e; }
body.is-light-view .photo-scroll-feed .like-btn { color: #edf5df; border-color: rgba(237, 245, 223, .28); background: rgba(7, 20, 13, .35); }
body.is-light-view .photo-scroll-feed .feed-author { z-index: 3; }

.visitor-hub { display: grid; gap: 18px; }
.visitor-hub-tabs { display: flex; gap: 8px; border-bottom: 1px solid #ccd8c8; }
.visitor-hub-tab { display: inline-flex; align-items: center; gap: 7px; padding: 10px 2px; margin-right: 15px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: #627366; font-size: 12px; cursor: pointer; }
.visitor-new-collection { margin-left: auto; align-self: center; margin-bottom: 7px; padding: 7px 10px; border: 1px solid #b9cbb4; border-radius: 8px; background: #f8fbf6; color: #28794a; font-size: 10px; font-weight: 800; cursor: pointer; }
.visitor-new-collection:hover { background: #e5efd0; }
.visitor-hub-tab span { display: inline-grid; min-width: 20px; height: 20px; place-items: center; border-radius: 99px; background: #e3ecdf; color: #28794a; font-size: 10px; }
.visitor-hub-tab.active { color: #193023; border-bottom-color: #7fa44c; font-weight: 800; }
.visitor-hub-panel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.visitor-collection { display: flex; align-items: center; gap: 10px; min-height: 62px; padding: 11px; border: 1px solid #d4dfd1; border-radius: 12px; background: #f8fbf6; }
.visitor-collection-icon { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 9px; background: #e5efd0; color: #527c39; font-size: 20px; }
.visitor-collection div { display: grid; gap: 2px; min-width: 0; }
.visitor-collection strong { overflow: hidden; color: #193023; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.visitor-collection small { color: #718174; font-size: 10px; }
.visitor-favorite { position: relative; min-height: 132px; overflow: hidden; padding: 0; border: 0; border-radius: 11px; background: #dce7db; text-align: left; cursor: pointer; }
.visitor-favorite img { width: 100%; height: 132px; object-fit: cover; }
.visitor-favorite span { position: absolute; inset: auto 0 0; padding: 22px 9px 8px; color: #edf5df; background: linear-gradient(transparent, rgba(7,20,13,.78)); font-size: 11px; }
.visitor-empty, .visitor-hub-loading { color: #718174; font-size: 12px; line-height: 1.55; }

@media (max-width: 680px) {
  .profile-type-choices { grid-template-columns: 1fr; }
  .profile-type-choice { min-height: 0; display: grid; grid-template-columns: 38px 1fr; column-gap: 11px; align-items: center; }
  .profile-type-choice .profile-type-icon { grid-row: span 2; }
  .profile-type-choice > span:not(.profile-type-icon) { grid-column: 2; }
  .profile-type-choice small { grid-column: 2; margin-top: 1px; }
  .visitor-hub-panel { grid-template-columns: 1fr; }
  body.is-light-view .photo-scroll-feed { width: 100%; margin-bottom: 70px; gap: 10px; }
  body.is-light-view .photo-scroll-feed .feed-post,
  body.is-light-view .photo-scroll-feed .feed-visual { min-height: calc(100svh - 118px); border-radius: 0; }
  body.is-light-view .photo-scroll-feed .feed-caption { inset-inline: 14px; }
}

/* =====================================================================
   CARGA POR PASOS Y EQUIPO DEL FOTÓGRAFO
   ===================================================================== */
.upload-stepper {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 2px 0 8px;
  padding: 8px 10px;
  border: 1px solid #d6e0d1;
  border-radius: 12px;
  background: #f7faf4;
}
.upload-step {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 4px 5px;
  border: 0;
  background: transparent;
  color: #819084;
  font: 700 10px/1 var(--font-sans);
  letter-spacing: .03em;
  cursor: pointer;
}
.upload-step span {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid #becdbb;
  border-radius: 50%;
  background: #fff;
  color: #718174;
  font-size: 10px;
}
.upload-step.active { color: #193023; }
.upload-step.active span,
.upload-step.complete span {
  border-color: #5c8b48;
  background: #dcebc6;
  color: #245537;
}
.upload-step.complete { color: #527c39; }
.upload-stepper > i {
  flex: 1;
  min-width: 14px;
  height: 1px;
  background: #ccd9c9;
}
.upload-step-status {
  margin: 0 0 14px;
  color: #718174;
  font-size: 11px;
  line-height: 1.4;
}
.equipment-entry { display: flex; align-items: stretch; gap: 6px; }
.equipment-entry input { min-width: 0; flex: 1; }
.equipment-save {
  flex: 0 0 auto;
  padding: 0 9px;
  border: 1px solid #b9cbb4;
  border-radius: 8px;
  background: #f5f9f1;
  color: #3f7041;
  font: 700 10px/1 var(--font-sans);
  cursor: pointer;
}
.equipment-save:hover { border-color: #6c9a4e; background: #e8f2d9; }
.profile-equipment-section { margin-top: 34px; }
.profile-equipment-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; padding-bottom: 13px; border-bottom: 1px solid #ccd8c8; }
.profile-equipment-head h2 { margin: 4px 0 5px; color: #193023; font: 500 clamp(24px, 3vw, 34px)/1.05 var(--font-serif); }
.profile-equipment-head p { margin: 0; color: #718174; font-size: 11px; }
.profile-equipment-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.profile-equipment-panel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding-top: 14px; }
.profile-equipment-item { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 11px; border: 1px solid #d4dfd1; border-radius: 11px; background: #f8fbf6; }
.equipment-type-icon { display: grid; flex: 0 0 31px; width: 31px; height: 31px; place-items: center; border-radius: 9px; background: #e5efd0; color: #527c39; }
.equipment-type-icon svg { width: 16px; height: 16px; }
.profile-equipment-item > div:nth-child(2) { display: grid; gap: 2px; min-width: 0; }
.profile-equipment-item strong { overflow: hidden; color: #193023; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.profile-equipment-item small { overflow: hidden; color: #718174; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.equipment-remove { margin-left: auto; border: 0; background: transparent; color: #8b9a8b; font-size: 18px; line-height: 1; cursor: pointer; }
.equipment-remove:hover { color: #b84c43; }
@media (max-width: 620px) {
  .upload-stepper { gap: 3px; padding: 7px 6px; }
  .upload-step { flex: 1; justify-content: center; gap: 4px; font-size: 9px; }
  .upload-stepper > i { min-width: 4px; }
  .profile-equipment-head { align-items: start; flex-direction: column; gap: 12px; }
  .profile-equipment-panel { grid-template-columns: 1fr; }
}

/* =====================================================================
   PERFILES, FICHA DE AUTOR Y HOTSPOTS DEL MAPA
   ===================================================================== */
.profile-page { min-height: calc(100vh - 68px); overflow-x: clip; background: #f7f8f3; }
.profile-cover {
  position: relative;
  width: 100vw;
  height: 286px;
  margin-left: calc(50% - 50vw);
  overflow: hidden;
  background-color: #1b3024;
  background-image: linear-gradient(180deg, rgba(7, 20, 13, .08), rgba(7, 20, 13, .7)), var(--profile-cover-image);
  background-position: center;
  background-size: cover;
}
.profile-cover::after { content: ''; position: absolute; inset: auto 0 0; height: 92px; background: linear-gradient(transparent, rgba(7, 20, 13, .32)); pointer-events: none; }
.profile-cover-inner { position: relative; z-index: 1; display: flex; align-items: start; justify-content: space-between; width: min(1740px, calc(100vw - 80px)); max-width: none; height: 100%; padding-top: 26px; }
.profile-cover-label { display: flex; gap: 8px; color: rgba(246, 250, 239, .9); font-size: 10px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.profile-cover-label span + span { padding-left: 8px; border-left: 1px solid rgba(246, 250, 239, .42); }
.profile-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: clamp(36px, 5vw, 78px); width: min(1740px, calc(100vw - 80px)); max-width: none; margin-inline: auto; align-items: start; padding-top: 0; padding-bottom: 96px; }
.profile-sidebar { position: relative; z-index: 2; margin-top: -54px; }
.profile-avatar-wrap { width: 112px; height: 112px; padding: 5px; border-radius: 50%; background: #f7f8f3; box-shadow: 0 5px 18px rgba(22, 49, 31, .12); }
.profile-avatar-wrap .photographer-avatar { width: 100%; height: 100%; border: 1px solid #cad7c4; }
.profile-avatar-wrap .photographer-avatar--initials { font-size: 38px; }
.profile-identity { display: grid; gap: 5px; margin-top: 17px; }
.profile-identity h1 { color: #172b20; font: 700 28px/1.05 var(--font-display); letter-spacing: -.04em; }
.profile-role { color: #54705e; font-size: 12px; }
.profile-place { display: flex; align-items: center; gap: 5px; color: #718174; font-size: 11px; }
.profile-place span { color: #527c39; font-size: 15px; }
.profile-bio { max-width: 29ch; margin-top: 21px; color: #526558; font-size: 12px; line-height: 1.65; }
.profile-links { display: grid; gap: 8px; margin-top: 16px; }
.profile-links a { display: flex; justify-content: space-between; gap: 8px; color: #28794a; font-size: 11px; font-weight: 700; }
.profile-links a span { color: #88a280; }
.profile-actions { display: grid; gap: 8px; margin-top: 24px; }
.profile-action { min-height: 37px; padding: 9px 13px; border: 1px solid #cad7c4; border-radius: 8px; background: #fdfefb; color: #31533b; font-size: 11px; font-weight: 800; text-align: center; }
.profile-action:hover { border-color: #7da15e; background: #ecf3e2; }
.profile-action--primary { border-color: #28794a; background: #28794a; color: #f6fbef; }
.profile-action--primary:hover { border-color: #1d6139; background: #1d6139; }
.profile-stats { display: grid; gap: 12px; margin-top: 30px; padding-top: 20px; border-top: 1px solid #d5dfd1; }
.profile-stats div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.profile-stats dt { color: #193023; font: 700 18px/1 var(--font-display); }
.profile-stats dd { margin: 0; color: #718174; font-size: 10px; text-transform: uppercase; letter-spacing: .09em; }
.profile-credit { margin-top: 25px; color: #8a988c; font-size: 10px; line-height: 1.5; }
.profile-main { min-width: 0; padding-top: 36px; }
.profile-tabs { display: flex; gap: 28px; min-height: 46px; border-bottom: 1px solid #d5dfd1; }
.profile-tab { position: relative; align-self: stretch; padding: 0 0 12px; border: 0; background: transparent; color: #7b897d; font-size: 12px; font-weight: 700; }
.profile-tab::after { content: ''; position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: transparent; }
.profile-tab:hover, .profile-tab.active { color: #193023; }
.profile-tab.active::after { background: #193023; }
.profile-panel { padding-top: 30px; }
.profile-panel:not([hidden]) { animation: profile-panel-in .28s ease-out both; }
@keyframes profile-panel-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.profile-gallery-head, .profile-equipment-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 21px; padding: 0; border: 0; }
.profile-kicker { color: #6d8a4c; font-size: 10px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.profile-gallery-head h2, .profile-equipment-head h2, .profile-info-head h2 { margin-top: 5px; color: #193023; font: 600 30px/1.05 var(--font-display); letter-spacing: -.04em; }
.profile-work-count { color: #87948a; font-size: 11px; }
.profile-gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.profile-photo, .profile-photo:nth-child(n) { position: relative; grid-column: span 1; grid-row: auto; min-width: 0; aspect-ratio: 1.2 / 1; overflow: hidden; padding: 0; border: 0; border-radius: 3px; background: #dce7db; cursor: pointer; }
.profile-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.profile-photo:hover img, .profile-photo:focus-visible img { transform: scale(1.035); }
.profile-photo-meta { position: absolute; right: 0; bottom: 0; left: 0; display: grid; gap: 3px; padding: 34px 12px 10px; color: #f6fbef; background: linear-gradient(transparent, rgba(7, 20, 13, .82)); text-align: left; opacity: 0; transform: translateY(4px); transition: opacity .2s ease, transform .2s ease; }
.profile-photo:hover .profile-photo-meta, .profile-photo:focus-visible .profile-photo-meta { opacity: 1; transform: translateY(0); }
.profile-photo-meta strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.profile-photo-meta small { color: #dceeb1; font-size: 10px; }
.profile-gallery-empty { display: grid; gap: 7px; padding: 48px 20px; border: 1px dashed #cbd8c8; border-radius: 9px; color: #718174; text-align: center; }
.profile-gallery-empty strong { color: #31533b; font-size: 13px; }
.profile-gallery-empty span { font-size: 11px; }
.profile-private-note { padding: 30px 0; color: #718174; font-size: 12px; }
.profile-info-panel { padding-bottom: 18px; }
.profile-info-head { margin-bottom: 22px; }
.profile-info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; overflow: hidden; border: 1px solid #d5dfd1; border-radius: 9px; background: #d5dfd1; }
.profile-info-grid > div { display: grid; gap: 5px; min-width: 0; padding: 16px; background: #fdfefb; }
.profile-info-grid span { color: #87948a; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.profile-info-grid strong, .profile-info-grid a { overflow: hidden; color: #31533b; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.profile-info-grid a:hover { color: #28794a; text-decoration: underline; }
.profile-personal-space { margin-top: 44px; padding-top: 28px; border-top: 1px solid #d5dfd1; }
.profile-personal-space-head { display: grid; gap: 6px; margin-bottom: 18px; }
.profile-personal-space-head h2 { color: #193023; font: 600 24px/1.05 var(--font-display); letter-spacing: -.035em; }
.profile-personal-space-head p { color: #718174; font-size: 12px; line-height: 1.55; }
.profile-discoverability { display: flex; align-items: flex-start; gap: 11px; margin-top: 18px; padding: 14px 15px; border: 1px solid #cbdccb; border-radius: 11px; background: #f5faf3; color: #31533b; cursor: pointer; }
.profile-discoverability input { width: 18px; height: 18px; margin-top: 1px; flex: 0 0 auto; accent-color: #28794a; }
.profile-discoverability span { display: grid; gap: 4px; }
.profile-discoverability strong { font-size: 12px; line-height: 1.4; }
.profile-discoverability small { color: #718174; font-size: 11px; line-height: 1.45; }
.profile-equipment-section { margin-top: 31px; padding-top: 26px; border-top: 1px solid #d5dfd1; }
.profile-equipment-head { align-items: end; margin-bottom: 15px; }
.profile-equipment-head h2 { font-size: 23px; }
.profile-equipment-head p { margin-top: 6px; color: #718174; font-size: 11px; }
.profile-equipment-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-top: 0; }
.profile-equipment-item { background: #fdfefb; }
.hotspots-drawer { background: #f7fbf5; border-color: #c6d8c4; box-shadow: 0 16px 34px rgba(35, 69, 43, .18); backdrop-filter: none; }
.map-legend { background: #f7fbf5; border-color: #c6d8c4; color: #718174; box-shadow: 0 8px 22px rgba(35, 69, 43, .12); backdrop-filter: none; }
.map-legend .legend-title { color: #31533b; }
.hotspots-head { border-bottom-color: #d5dfd1; }
.hotspots-head h3, .hotspots-head button { color: #193023; }
.hotspots-drawer > p { color: #718174; }
.hotspot-item { background: #edf5ee; border-color: #c4d7c4; color: #31533b; }
.hotspot-item:hover { background: #deecd8; border-color: #7da15e; }
.hotspot-item .hc { color: #718174; }
.hotspot-marker-icon { background: transparent; border: 0; }
.hotspot-marker-dot { display: grid; width: 26px; height: 26px; place-items: center; border: 2px solid #f7fbf5; border-radius: 50% 50% 50% 0; background: #28794a; box-shadow: 0 3px 12px rgba(23, 72, 39, .38); transform: rotate(-45deg); }
.hotspot-marker-dot i { width: 7px; height: 7px; border-radius: 50%; background: #d9ef8b; }
.hotspot-tooltip { border: 1px solid #c6d8c4 !important; border-radius: 7px !important; background: #f7fbf5 !important; color: #193023 !important; box-shadow: 0 5px 14px rgba(35, 69, 43, .16) !important; }
.hotspot-tooltip::before { border-top-color: #c6d8c4 !important; }
.hotspot-tooltip strong { font-size: 11px; }
.hotspot-tooltip span { color: #6d8a4c; font-size: 10px; }
.hotspot-legend-dot { display: inline-block; width: 9px; height: 9px; margin-right: 7px; border: 2px solid #f7fbf5; border-radius: 50%; background: #28794a; box-shadow: 0 0 0 1px #28794a; }

@media (max-width: 860px) {
  .profile-layout { grid-template-columns: 205px minmax(0, 1fr); gap: 30px; }
  .profile-cover { height: 235px; }
  .profile-avatar-wrap { width: 94px; height: 94px; }
  .profile-identity h1 { font-size: 23px; }
  .profile-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
}
@media (max-width: 620px) {
  .profile-cover { width: 100%; height: 183px; margin-left: 0; }
  .profile-cover-inner { width: auto; max-width: none; padding-top: 16px; }
  .profile-cover-label { font-size: 8px; letter-spacing: .1em; }
  .profile-layout { display: block; width: auto; max-width: none; margin-inline: 0; padding: 0 14px 72px; }
  .profile-sidebar { margin-top: -48px; }
  .profile-avatar-wrap { width: 88px; height: 88px; }
  .profile-identity { margin-top: 12px; }
  .profile-identity h1 { font-size: 25px; }
  .profile-bio { max-width: 46ch; margin-top: 13px; }
  .profile-actions { display: flex; flex-wrap: wrap; margin-top: 17px; }
  .profile-action { flex: 1 1 145px; }
  .profile-stats { grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 21px; padding-top: 15px; }
  .profile-stats div { display: grid; gap: 3px; }
  .profile-stats dt { font-size: 16px; }
  .profile-stats dd { font-size: 8px; letter-spacing: .05em; }
  .profile-credit { display: none; }
  .profile-main { padding-top: 30px; }
  .profile-tabs { gap: 22px; }
  .profile-gallery-head, .profile-equipment-head { align-items: start; flex-direction: column; gap: 8px; }
  .profile-gallery-head h2, .profile-info-head h2 { font-size: 26px; }
  .profile-work-count { align-self: end; margin-top: -24px; }
  .profile-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .profile-photo { aspect-ratio: 1 / 1.08; border-radius: 2px; }
  .profile-photo-meta { padding: 28px 8px 7px; opacity: 1; transform: none; }
  .profile-photo-meta strong { font-size: 10px; }
  .profile-photo-meta small { font-size: 9px; }
  .profile-info-grid { grid-template-columns: 1fr; }
  .profile-equipment-panel { grid-template-columns: 1fr; }
  .hotspots-drawer { top: 76px; left: 10px; width: calc(100% - 20px); max-height: 66svh; }
}
