:root {
  --verde-noche: #01180f;
  --verde-profundo: #023020;
  --verde-institucional: #015336;
  --verde-brillante: #0b7a4f;
  --dorado: #D4AF37;
  --dorado-oscuro: #B8860B;
  --dorado-claro: #F3E5AB;
  --oro-vivo: #FFD700;
  --marfil: #FBF7EA;
  --blanco: #FFFFFF;
  --azul-acento: #0055A5;
  --texto-boton: #02241a;
  --texto-suave: rgba(251, 247, 234, 0.8);
  --linea-dorada: rgba(212, 175, 55, 0.4);
  --degradado-oro: linear-gradient(135deg, #F3E5AB 0%, #D4AF37 30%, #B8860B 55%, #FFD700 80%, #F3E5AB 100%);
  --fuente-titulos: "Palatino Linotype", Palatino, "Book Antiqua", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --fuente-texto: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --curva-suave: cubic-bezier(0.22, 1, 0.36, 1);
  --alto-pantalla: 100vh;
  --margen-inferior: calc(112px + env(safe-area-inset-bottom, 0px));
}

@supports (height: 100dvh) {
  :root {
    --alto-pantalla: 100dvh;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
}

body {
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 50% 0%, #0a5a3a 0%, rgba(2, 48, 32, 0) 60%),
    radial-gradient(90% 60% at 50% 100%, #013a26 0%, rgba(1, 24, 15, 0) 70%),
    var(--verde-profundo);
  color: var(--marfil);
  font-family: var(--fuente-texto);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

button {
  font: inherit;
}

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

.icono {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.fondo {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.fondo__rayos {
  position: absolute;
  left: 50%;
  top: -60vmax;
  width: 160vmax;
  height: 160vmax;
  margin-left: -80vmax;
  background: repeating-conic-gradient(from 0deg, rgba(212, 175, 55, 0.1) 0deg 3deg, rgba(212, 175, 55, 0) 3deg 15deg);
  -webkit-mask-image: radial-gradient(closest-side, #000 15%, transparent 72%);
  mask-image: radial-gradient(closest-side, #000 15%, transparent 72%);
  opacity: 0.6;
  animation: girar 120s linear infinite;
}

.fondo__reticula {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(212, 175, 55, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212, 175, 55, 0.05) 1px, transparent 1px);
  background-size: 36px 36px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000 0%, transparent 70%);
  mask-image: radial-gradient(ellipse at 50% 40%, #000 0%, transparent 70%);
}

.fondo__luz {
  position: absolute;
  border-radius: 50%;
  filter: blur(48px);
  opacity: 0.32;
  animation: flotar-luz 16s ease-in-out infinite alternate;
}

.fondo__luz--uno {
  width: 60vmin;
  height: 60vmin;
  left: -18vmin;
  top: 18%;
  background: var(--dorado);
  opacity: 0.16;
}

.fondo__luz--dos {
  width: 70vmin;
  height: 70vmin;
  right: -24vmin;
  top: 44%;
  background: var(--verde-brillante);
  animation-delay: -6s;
}

.fondo__luz--tres {
  width: 40vmin;
  height: 40vmin;
  left: 30%;
  bottom: -14vmin;
  background: var(--azul-acento);
  opacity: 0.14;
  animation-delay: -11s;
}

.fondo__ondas {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 22vh;
  opacity: 0.8;
}

.lienzo-confeti {
  position: fixed;
  inset: 0;
  z-index: 40;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.periodo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 0;
  color: var(--dorado-claro);
  font-family: var(--fuente-titulos);
  font-size: 1rem;
  letter-spacing: 0.4em;
  text-indent: 0.4em;
}

.periodo::before,
.periodo::after {
  content: "";
  width: 42px;
  height: 1px;
  background: linear-gradient(90deg, rgba(212, 175, 55, 0), var(--dorado));
}

.periodo::after {
  transform: scaleX(-1);
}

.portada {
  display: none;
}

.js .portada:not([hidden]) {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: calc(24px + env(safe-area-inset-top, 0px)) 24px calc(24px + env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  text-align: center;
  cursor: pointer;
  background: radial-gradient(ellipse at 50% 42%, rgba(1, 83, 54, 0.5) 0%, rgba(1, 24, 15, 0.94) 72%);
  transition: opacity 0.85s var(--curva-suave), transform 0.95s var(--curva-suave), visibility 0.85s;
}

.portada--saliendo {
  opacity: 0;
  visibility: hidden;
  transform: scale(1.08);
  pointer-events: none;
}

.portada__contenido > * {
  animation: subir 1s var(--curva-suave) both;
}

.portada__contenido > :nth-child(1) { animation-delay: 0.15s; }
.portada__contenido > :nth-child(2) { animation-delay: 0.3s; }
.portada__contenido > :nth-child(3) { animation-delay: 0.9s; }
.portada__contenido > :nth-child(4) { animation-delay: 1.1s; }
.portada__contenido > :nth-child(5) { animation-delay: 1.35s; }
.portada__contenido > :nth-child(6) { animation-delay: 1.6s; }

.portada__entidad {
  margin: 0;
  color: var(--dorado-claro);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

.emblema {
  position: relative;
  display: grid;
  place-items: center;
  width: min(62vw, 270px);
  aspect-ratio: 1 / 1;
  margin: 22px auto 18px;
}

.emblema::before {
  content: "";
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.28) 0%, rgba(212, 175, 55, 0) 70%);
  animation: respirar 4s ease-in-out infinite;
}

.emblema__anillos {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.emblema__anillo {
  fill: none;
  stroke: url(#oro-emblema);
  stroke-width: 1.6;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  transform-origin: 100px 100px;
  transform: rotate(-90deg);
  animation: trazar 2.4s var(--curva-suave) 0.5s forwards;
}

.emblema__anillo--interior {
  stroke-width: 0.8;
  animation-delay: 0.8s;
}

.emblema__marcas {
  fill: none;
  stroke: var(--dorado);
  stroke-width: 3;
  stroke-dasharray: 0.35 1.65;
  opacity: 0.45;
  transform-origin: 100px 100px;
  animation: girar 60s linear infinite;
}

.emblema__centro {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.emblema__numero {
  font-family: var(--fuente-titulos);
  font-size: min(30vw, 132px);
  font-weight: 700;
  line-height: 1;
  background: var(--degradado-oro);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 6px 18px rgba(212, 175, 55, 0.35));
  animation: brillo-oro 5s linear infinite, aparecer-numero 1.4s var(--curva-suave) 0.6s both;
}

.emblema__anos {
  margin-top: 2px;
  color: var(--dorado-claro);
  font-family: var(--fuente-titulos);
  font-size: 0.95rem;
  letter-spacing: 0.55em;
  text-indent: 0.55em;
  animation: subir 1s var(--curva-suave) 1.1s both;
}

.portada__titulo {
  margin: 0 auto 12px;
  max-width: 22ch;
  font-family: var(--fuente-titulos);
  font-size: clamp(1.35rem, 5.8vw, 2.1rem);
  font-weight: 400;
  line-height: 1.25;
}

.portada__aniversario {
  display: block;
  margin-bottom: 0.6em;
  color: var(--dorado);
  font-size: 0.52em;
  letter-spacing: 0.34em;
  text-indent: 0.34em;
  text-transform: uppercase;
}

.boton-abrir {
  position: relative;
  margin-top: 30px;
  padding: 16px 32px;
  border: 1px solid rgba(255, 243, 196, 0.85);
  border-radius: 999px;
  background: var(--degradado-oro);
  background-size: 200% 100%;
  color: var(--texto-boton);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 12px 32px -8px rgba(212, 175, 55, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.boton-abrir::before {
  content: "";
  position: absolute;
  inset: -6px;
  border: 1px solid rgba(255, 215, 0, 0.6);
  border-radius: inherit;
  animation: aro 2.2s ease-out infinite;
}

.boton-abrir:focus-visible {
  outline: 3px solid var(--blanco);
  outline-offset: 6px;
}

.portada__indicacion {
  margin: 18px 0 0;
  color: var(--texto-suave);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
}

.carrusel {
  position: fixed;
  inset: 0;
  z-index: 10;
  overflow: hidden;
}

.pista {
  display: flex;
  width: 200%;
  height: 100%;
  transform: translate3d(0, 0, 0);
  transition: transform 0.8s var(--curva-suave);
  will-change: transform;
}

.pista--ubicacion {
  transform: translate3d(-50%, 0, 0);
}

.pista--arrastrando {
  transition: none;
}

.pantalla {
  width: 50%;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

.pantalla__contenido {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  width: 100%;
  max-width: 640px;
  min-height: 100%;
  margin: 0 auto;
  padding: calc(26px + env(safe-area-inset-top, 0px)) 16px var(--margen-inferior);
  text-align: center;
}

.pantalla--invitacion .pantalla__contenido {
  justify-content: center;
}

.js body:not(.abierta) .revelar {
  opacity: 0;
}

.abierta .revelar {
  animation: subir 0.9s var(--curva-suave) both;
  animation-delay: calc(var(--orden, 0) * 110ms + 250ms);
}

.encabezado {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.sobretitulo {
  margin: 0;
  color: var(--dorado);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.34em;
  text-indent: 0.34em;
  text-transform: uppercase;
}

.titulo {
  margin: 0;
  font-family: var(--fuente-titulos);
  font-size: clamp(1.45rem, 6.2vw, 2.2rem);
  font-weight: 400;
  line-height: 1.2;
  background: linear-gradient(180deg, var(--blanco) 0%, var(--dorado-claro) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.titulo:focus {
  outline: none;
}

.escena-tarjeta {
  width: 100%;
  max-width: 560px;
  padding: 6px 0 16px;
  perspective: 1400px;
}

.js body:not(.abierta) .escena-tarjeta {
  opacity: 0;
}

.abierta .escena-tarjeta {
  animation: entrada-tarjeta 1.4s var(--curva-suave) 0.45s both;
}

.tarjeta {
  position: relative;
  display: block;
  width: 100%;
  border-radius: 14px;
  cursor: pointer;
  transform-style: preserve-3d;
  -webkit-user-select: none;
  user-select: none;
  animation: flotar 6s ease-in-out infinite;
}

.tarjeta::before {
  content: "";
  display: block;
  padding-top: 66.6667%;
}

.tarjeta:focus {
  outline: none;
}

.tarjeta:focus-visible .tarjeta__cara {
  box-shadow: 0 0 0 3px var(--oro-vivo), 0 24px 50px -18px rgba(0, 0, 0, 0.75);
}

.tarjeta__elevador,
.tarjeta__interior {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}

.tarjeta__interior {
  transition: transform 1s cubic-bezier(0.3, 0.9, 0.25, 1);
  will-change: transform;
}

.tarjeta--volteada .tarjeta__interior {
  transform: rotateY(180deg);
}

.tarjeta__cara {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 12px;
  background: var(--verde-profundo);
  box-shadow: 0 0 0 1px rgba(243, 229, 171, 0.5), 0 24px 50px -18px rgba(0, 0, 0, 0.75);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: rotateY(0deg) translateZ(1px);
}

.tarjeta__cara--reverso {
  transform: rotateY(180deg) translateZ(1px);
}

.tarjeta__cara::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0) 32%, rgba(255, 255, 255, 0.26) 46%, rgba(255, 248, 220, 0.08) 52%, rgba(255, 255, 255, 0) 62%);
  transform: translateX(-130%);
  animation: barrido 8s ease-in-out 3s infinite;
  pointer-events: none;
}

.tarjeta__cara img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  -webkit-user-drag: none;
}

.tarjeta--celebrando .tarjeta__cara {
  animation: halo 1s ease-out;
}

.tarjeta__sombra {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: -20px;
  height: 26px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0) 70%);
  filter: blur(6px);
  pointer-events: none;
}

.controles-tarjeta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 16px;
}

.indicacion {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--texto-suave);
  font-size: 0.86rem;
}

.indicacion .icono {
  width: 18px;
  height: 18px;
  color: var(--dorado);
}

.boton-texto {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 16px;
  border: 1px solid var(--linea-dorada);
  border-radius: 999px;
  background: rgba(1, 40, 26, 0.45);
  color: var(--dorado-claro);
  font-size: 0.86rem;
  cursor: pointer;
  transition: background-color 0.3s, border-color 0.3s;
}

.boton-texto .icono {
  width: 16px;
  height: 16px;
}

.boton-texto:hover {
  border-color: var(--dorado);
  background: rgba(1, 83, 54, 0.6);
}

.boton-texto:focus-visible,
.boton-volver:focus-visible,
.selector__opcion:focus-visible,
.visor__cerrar:focus-visible {
  outline: 3px solid var(--oro-vivo);
  outline-offset: 3px;
}

.lema {
  max-width: 30ch;
  margin: 4px 0 0;
  color: var(--marfil);
  font-family: var(--fuente-titulos);
  font-size: clamp(1.08rem, 4.6vw, 1.35rem);
  font-style: italic;
  line-height: 1.45;
}

.datos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  max-width: 420px;
  margin: 0;
  padding: 14px 0;
  border-top: 1px solid var(--linea-dorada);
  border-bottom: 1px solid var(--linea-dorada);
}

.dato {
  padding: 0 10px;
}

.dato + .dato {
  border-left: 1px solid var(--linea-dorada);
}

.dato dt {
  color: var(--dorado);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.dato dd {
  margin: 4px 0 0;
  color: var(--marfil);
  font-size: 0.95rem;
  line-height: 1.35;
}

.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 22px;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  transition: transform 0.2s var(--curva-suave), box-shadow 0.3s, background-position 0.5s, background-color 0.3s, border-color 0.3s;
}

.boton:active {
  transform: scale(0.97);
}

.boton:focus-visible {
  outline: 3px solid var(--oro-vivo);
  outline-offset: 3px;
}

.boton--primario {
  border: 1px solid rgba(255, 243, 196, 0.85);
  background: var(--degradado-oro);
  background-size: 200% 100%;
  color: var(--texto-boton);
  box-shadow: 0 14px 30px -12px rgba(212, 175, 55, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.boton--primario:hover {
  background-position: 100% 0;
}

.boton--secundario {
  border: 1px solid var(--linea-dorada);
  background: rgba(1, 83, 54, 0.45);
  color: var(--marfil);
  font-size: 0.92rem;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.boton--secundario .icono {
  color: var(--dorado);
}

.boton--secundario:hover {
  border-color: var(--dorado);
  background: rgba(1, 83, 54, 0.7);
}

.boton--ancho {
  width: 100%;
  max-width: 420px;
}

.boton__textos {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.boton__textos small {
  font-size: 0.76rem;
  font-weight: 500;
  opacity: 0.8;
}

.icono--empujar {
  animation: empujar 1.6s ease-in-out infinite;
}

.nota {
  max-width: 34ch;
  margin: 0;
  color: rgba(251, 247, 234, 0.62);
  font-size: 0.78rem;
}

.boton-volver {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 6px;
  min-height: 44px;
  padding: 8px 16px 8px 12px;
  border: 1px solid var(--linea-dorada);
  border-radius: 999px;
  background: rgba(1, 40, 26, 0.5);
  color: var(--dorado-claro);
  font-size: 0.9rem;
  cursor: pointer;
}

.mapa {
  width: 100%;
  margin: 0;
}

.mapa__escenario {
  position: relative;
  height: clamp(260px, 44vh, 400px);
  overflow: hidden;
  border: 1px solid var(--linea-dorada);
  border-radius: 22px;
  background:
    radial-gradient(ellipse at 50% 120%, rgba(11, 122, 79, 0.4) 0%, rgba(11, 122, 79, 0) 60%),
    linear-gradient(180deg, #01150d 0%, #022a1c 60%, #03392a 100%);
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.5), 0 20px 40px -20px rgba(0, 0, 0, 0.8);
  perspective: 900px;
  perspective-origin: 50% 20%;
  isolation: isolate;
}

.mapa__escenario::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(180deg, rgba(1, 21, 13, 0.95) 0%, rgba(1, 21, 13, 0) 30%);
  pointer-events: none;
}

.mapa__escena {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}

.pantalla--activa .mapa__escena {
  animation: desplegar-mapa 1.5s var(--curva-suave) both, balanceo 16s ease-in-out 1.5s infinite;
}

.mapa__plano {
  --inclinacion: 56deg;
  --giro: -12deg;
  position: absolute;
  left: 50%;
  top: 50%;
  width: 112%;
  height: 0;
  padding-bottom: 84%;
  border-radius: 18px;
  transform: translate(-50%, -50%) rotateX(var(--inclinacion)) rotateZ(var(--giro));
  transform-style: preserve-3d;
  box-shadow: 0 0 60px rgba(212, 175, 55, 0.12);
}

.mapa__svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.mapa__texto-agua {
  fill: rgba(243, 229, 171, 0.55);
  font-family: var(--fuente-texto);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 3px;
}

.mapa__texto-norte {
  fill: var(--oro-vivo);
  font-family: var(--fuente-texto);
  font-size: 9px;
  font-weight: 700;
}

.mapa__ruta {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
}

.pantalla--activa .mapa__ruta {
  animation: trazar 2.2s var(--curva-suave) 0.6s forwards;
}

.mapa__flujo {
  opacity: 0.8;
  animation: flujo 1.2s linear infinite;
}

.mapa__pulso {
  position: absolute;
  left: 75%;
  top: 61.33%;
  width: 64px;
  height: 64px;
  margin: -32px 0 0 -32px;
  border: 2px solid var(--oro-vivo);
  border-radius: 50%;
  opacity: 0;
  animation: pulso 2.6s ease-out infinite;
}

.mapa__pulso--retraso {
  animation-delay: 1.3s;
}

.mapa__erguido {
  position: absolute;
  width: 0;
  height: 0;
  transform-style: preserve-3d;
}

.mapa__erguido--ciudad {
  left: 28.5%;
  top: 36%;
}

.mapa__erguido--destino {
  left: 75%;
  top: 61.33%;
}

.mapa__erguido > * {
  position: absolute;
  left: 0;
  bottom: 0;
  transform-origin: 50% 100%;
  transform: translateX(-50%) rotateZ(calc(var(--giro) * -1)) rotateX(calc(var(--inclinacion) * -1));
}

.etiqueta-ciudad {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--dorado-claro);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
}

.etiqueta-ciudad::after {
  content: "";
  width: 1px;
  height: 14px;
  margin-top: 3px;
  background: linear-gradient(180deg, var(--dorado-claro), rgba(243, 229, 171, 0));
}

.marcador__cuerpo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.pantalla--activa .marcador__cuerpo {
  animation: caer-pin 1s cubic-bezier(0.34, 1.4, 0.64, 1) 0.9s both, flotar-pin 2.8s ease-in-out 1.9s infinite;
}

.marcador__rotulo {
  padding: 5px 10px;
  border: 1px solid var(--dorado);
  border-radius: 999px;
  background: rgba(2, 48, 32, 0.92);
  color: var(--marfil);
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 8px 18px -6px rgba(0, 0, 0, 0.7);
}

.marcador__pin {
  width: 40px;
  height: 52px;
  filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.55));
}

.mapa__nota {
  margin-top: 8px;
  color: rgba(251, 247, 234, 0.6);
  font-size: 0.74rem;
}

.ficha {
  display: flex;
  gap: 14px;
  width: 100%;
  padding: 18px;
  border: 1px solid var(--linea-dorada);
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(251, 247, 234, 0.1) 0%, rgba(1, 83, 54, 0.38) 100%);
  text-align: left;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.ficha__icono {
  display: grid;
  flex: none;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--degradado-oro);
  color: var(--verde-profundo);
}

.ficha__icono .icono {
  width: 24px;
  height: 24px;
  stroke-width: 2;
}

.ficha__texto {
  min-width: 0;
}

.ficha__lugar {
  margin: 0 0 6px;
  color: var(--marfil);
  font-family: var(--fuente-titulos);
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.25;
}

.ficha__lugar span {
  color: var(--dorado-claro);
  font-weight: 400;
}

.ficha__direccion {
  color: var(--texto-suave);
  font-style: normal;
  line-height: 1.5;
  -webkit-user-select: text;
  user-select: text;
}

.ficha__detalle {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 10px 0 0;
  color: var(--dorado-claro);
  font-size: 0.82rem;
}

.acciones-ubicacion {
  display: grid;
  justify-items: center;
  gap: 10px;
  width: 100%;
}

.acciones-ubicacion .boton--ancho {
  max-width: none;
}

.acciones-secundarias {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
}

.acciones-secundarias > :first-child {
  grid-column: 1 / -1;
}

.acciones-secundarias .boton {
  padding: 12px 14px;
}

.selector {
  position: fixed;
  left: 50%;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: min(calc(100% - 32px), 340px);
  padding: 5px;
  border: 1px solid var(--linea-dorada);
  border-radius: 999px;
  background: rgba(1, 30, 20, 0.78);
  box-shadow: 0 14px 34px -12px rgba(0, 0, 0, 0.75);
  transform: translateX(-50%);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  transition: opacity 0.6s var(--curva-suave), transform 0.6s var(--curva-suave);
}

.js body:not(.abierta) .selector {
  opacity: 0;
  transform: translate(-50%, 24px);
  pointer-events: none;
}

.selector__indicador {
  position: absolute;
  top: 5px;
  bottom: 5px;
  left: 5px;
  width: calc(50% - 5px);
  border-radius: 999px;
  background: var(--degradado-oro);
  box-shadow: 0 6px 16px -6px rgba(212, 175, 55, 0.7);
  transition: transform 0.6s var(--curva-suave);
}

.selector--ubicacion .selector__indicador {
  transform: translateX(100%);
}

.selector__opcion {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--texto-suave);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.4s;
}

.selector__opcion .icono {
  width: 18px;
  height: 18px;
}

.selector__opcion[aria-current="page"] {
  color: var(--texto-boton);
}

.visor {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(1, 14, 9, 0.95);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.visor[hidden] {
  display: none;
}

.visor--visible {
  opacity: 1;
}

.visor__imagen {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(94vw, calc(var(--alto-pantalla) * 1.2));
  height: auto;
  border-radius: 10px;
  box-shadow: 0 0 0 1px rgba(243, 229, 171, 0.5), 0 30px 60px -20px rgba(0, 0, 0, 0.9);
  transform: translate(-50%, -50%) scale(0.94);
  transition: transform 0.4s var(--curva-suave);
}

.visor--visible .visor__imagen {
  transform: translate(-50%, -50%) scale(1);
}

@media (orientation: portrait) {
  .visor__imagen {
    width: min(calc(var(--alto-pantalla) * 0.78), 141vw);
    transform: translate(-50%, -50%) rotate(90deg) scale(0.94);
  }

  .visor--visible .visor__imagen {
    transform: translate(-50%, -50%) rotate(90deg) scale(1);
  }
}

.visor__cerrar {
  position: absolute;
  top: calc(14px + env(safe-area-inset-top, 0px));
  right: 14px;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--linea-dorada);
  border-radius: 50%;
  background: rgba(1, 40, 26, 0.8);
  color: var(--marfil);
  cursor: pointer;
}

.visor__voltear {
  position: absolute;
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  border-radius: 999px;
}

.visor__voltear:active {
  transform: translateX(-50%) scale(0.97);
}

.aviso {
  position: fixed;
  left: 50%;
  bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  z-index: 60;
  max-width: calc(100% - 32px);
  padding: 12px 18px;
  border: 1px solid var(--dorado);
  border-radius: 14px;
  background: rgba(2, 48, 32, 0.96);
  color: var(--marfil);
  font-size: 0.9rem;
  text-align: center;
  box-shadow: 0 14px 30px -10px rgba(0, 0, 0, 0.8);
  opacity: 0;
  transform: translate(-50%, 16px);
  transition: opacity 0.35s var(--curva-suave), transform 0.35s var(--curva-suave);
  pointer-events: none;
}

.aviso--visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.onda {
  position: fixed;
  z-index: 41;
  width: 320px;
  height: 320px;
  margin: -160px 0 0 -160px;
  border: 2px solid var(--oro-vivo);
  border-radius: 50%;
  box-shadow: 0 0 24px rgba(255, 215, 0, 0.5), inset 0 0 24px rgba(255, 215, 0, 0.35);
  pointer-events: none;
  animation: onda 0.95s cubic-bezier(0.1, 0.7, 0.2, 1) forwards;
}

.onda--secundaria {
  border-width: 1px;
  border-color: var(--dorado-claro);
  box-shadow: none;
  animation-duration: 1.3s;
  animation-delay: 0.08s;
}

.resplandor {
  position: fixed;
  inset: 0;
  z-index: 39;
  background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(243, 229, 171, 0.45) 0%, rgba(212, 175, 55, 0.12) 28%, rgba(212, 175, 55, 0) 60%);
  pointer-events: none;
  animation: resplandor 0.8s ease-out forwards;
}

.impacto {
  animation: impacto 0.5s var(--curva-suave);
}

@media (min-width: 720px) {
  .pantalla__contenido {
    padding-left: 24px;
    padding-right: 24px;
  }

  .mapa__escenario {
    height: clamp(320px, 46vh, 440px);
  }
}

@media (max-width: 340px) {
  .acciones-secundarias {
    grid-template-columns: 1fr;
  }

  .datos {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .dato + .dato {
    border-left: 0;
  }
}

@keyframes girar {
  to { transform: rotate(360deg); }
}

@keyframes flotar-luz {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(4vmin, -6vmin, 0) scale(1.12); }
}

@keyframes subir {
  from { opacity: 0; transform: translate3d(0, 22px, 0); }
  to { opacity: 1; transform: none; }
}

@keyframes trazar {
  to { stroke-dashoffset: 0; }
}

@keyframes respirar {
  0%, 100% { opacity: 0.6; transform: scale(0.96); }
  50% { opacity: 1; transform: scale(1.04); }
}

@keyframes brillo-oro {
  from { background-position: 0% 0; }
  to { background-position: 220% 0; }
}

@keyframes aparecer-numero {
  from { opacity: 0; transform: scale(0.7); letter-spacing: 0.3em; }
  to { opacity: 1; transform: scale(1); letter-spacing: 0; }
}

@keyframes aro {
  0% { opacity: 0.9; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.18, 1.5); }
}

@keyframes entrada-tarjeta {
  from { opacity: 0; transform: perspective(1200px) translate3d(0, 50px, 0) rotateX(32deg) scale(0.86); }
  to { opacity: 1; transform: none; }
}

@keyframes flotar {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -6px, 0); }
}

@keyframes barrido {
  0%, 72% { transform: translateX(-130%); }
  100% { transform: translateX(130%); }
}

@keyframes halo {
  0% { box-shadow: 0 0 0 1px rgba(243, 229, 171, 0.5), 0 24px 50px -18px rgba(0, 0, 0, 0.75); }
  30% { box-shadow: 0 0 0 2px var(--oro-vivo), 0 0 46px 6px rgba(255, 215, 0, 0.45); }
  100% { box-shadow: 0 0 0 1px rgba(243, 229, 171, 0.5), 0 24px 50px -18px rgba(0, 0, 0, 0.75); }
}

@keyframes empujar {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(5px); }
}

@keyframes desplegar-mapa {
  from { opacity: 0; transform: translate3d(0, 40px, 0) rotateX(-38deg); }
  to { opacity: 1; transform: none; }
}

@keyframes balanceo {
  0%, 100% { transform: rotateY(0deg); }
  25% { transform: rotateY(-6deg); }
  75% { transform: rotateY(6deg); }
}

@keyframes flujo {
  to { stroke-dashoffset: -12; }
}

@keyframes pulso {
  0% { opacity: 0.95; transform: scale(0.2); }
  100% { opacity: 0; transform: scale(2.4); }
}

@keyframes caer-pin {
  from { opacity: 0; transform: translate3d(0, -90px, 0); }
  to { opacity: 1; transform: none; }
}

@keyframes flotar-pin {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -6px, 0); }
}

@keyframes onda {
  from { opacity: 1; transform: scale(0.04); }
  to { opacity: 0; transform: scale(1); }
}

@keyframes resplandor {
  0% { opacity: 0; }
  25% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes impacto {
  0% { transform: scale(1); }
  30% { transform: scale(0.985); }
  100% { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.2s !important;
  }

  .tarjeta__interior {
    transition-duration: 0.45s !important;
  }

  .mapa__ruta {
    stroke-dashoffset: 0;
  }
}
