/* Amapa · piezas públicas (formularios, noticias, tableros, canción, recuadros).
   Para cambiar la tipografía de títulos: .amapa { --amapa-titulos: 'Tu fuente', sans-serif; } */

.amapa {
	--tinta: #0A0A0A;
	--crema: #F5F5F5;
	--rosa: #FFC400;
	--amarillo: #FF8A1F;
	--menta: #2ED47A;
	--lila: #3DA9FC;
	--acento: var(--rosa);
	--fondo: #0A0A0A;
	--superficie: #151515;
	--texto: #F5F5F5;
	--suave: #BDBDBD;
	--borde: rgba(255, 255, 255, .14);
	--amapa-titulos: 'Barlow Condensed', 'Arial Black', system-ui, sans-serif;
	--radio: var(--r-caja, 6px);
	color: var(--texto);
	box-sizing: border-box;
	line-height: 1.5;
}
.amapa *, .amapa *::before, .amapa *::after { box-sizing: border-box; }
.amapa--claro {
	--fondo: #FFFFFF;
	--superficie: #FFFFFF;
	--texto: #0A0A0A;
	--suave: #4A4740;
	--borde: rgba(10, 10, 10, .14);
}
.amapa h2, .amapa h3 { color: var(--texto); margin: 0; font-family: var(--amapa-titulos); letter-spacing: -.01em; }
.amapa p { margin: 0; }
.amapa a { color: inherit; }

.amapa-noticias, .amapa-tablero { background: var(--fondo); padding: clamp(20px, 3.5vw, 44px); border-radius: var(--r-caja, 6px); }
.amapa-calma-envoltura { display: flex; }
.amapa-bloque__titulo { font-size: clamp(30px, 4vw, 52px); line-height: 1; margin: 0 0 28px !important; }

/* Chips y botones */
.amapa-chip {
	display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: var(--r-chip, 3px);
	background: var(--chip, var(--acento)); color: #0A0A0A; font-weight: 600; font-size: 15px; line-height: 1.2;
}
.amapa-chip--lila { --chip: var(--lila); }
.amapa-boton {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px;
	border-radius: var(--r-chip, 3px); border: 2px solid var(--acento); background: var(--acento); color: #0A0A0A !important;
	font: inherit; font-weight: 600; font-size: 16px; text-decoration: none !important; cursor: pointer;
	transition: transform .25s cubic-bezier(.2, .8, .2, 1), background .25s, color .25s;
}
.amapa-boton:hover { transform: translateY(-2px); }
.amapa-boton:focus-visible { outline: 3px solid var(--texto); outline-offset: 3px; }
.amapa-boton--linea { background: transparent; color: var(--texto) !important; border-color: var(--borde); }
.amapa-boton--linea:hover { border-color: var(--texto); }
.amapa-boton--grande { min-height: 56px; padding: 0 30px; font-size: 17px; }
.amapa-boton[disabled] { opacity: .6; cursor: progress; transform: none; }
.amapa-boton.es-enviando::after {
	content: ''; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent;
	animation: amapa-girar .8s linear infinite;
}

/* Formularios */
.amapa-form { background: var(--superficie); border-radius: var(--r-caja, 6px); padding: clamp(22px, 4vw, 48px); max-width: 860px; margin: 0 auto; }
.amapa-form__cabeza { display: flex; flex-direction: column; gap: 14px; margin-bottom: 24px; }
.amapa-form__titulo { font-size: clamp(30px, 4vw, 46px); line-height: 1.02; }
.amapa-form__intro { font-size: 19px; color: var(--suave); max-width: 640px; }
.amapa-form__alerta { border-radius: var(--r-caja, 6px); padding: 16px 20px; margin-bottom: 22px; background: var(--amarillo); color: #0A0A0A; font-weight: 500; }
.amapa-form__campos { display: flex; flex-direction: column; gap: 20px; }
.amapa-campo { display: flex; flex-direction: column; gap: 8px; position: relative; border: 0; padding: 0; margin: 0; min-width: 0; }
.amapa-campo[hidden], .amapa-boton[hidden] { display: none; }
.amapa-campo > label, .amapa-campo legend, .amapa-foto__etiqueta { font-weight: 600; font-size: 16px; color: var(--texto); padding: 0; }
.amapa-req { color: var(--acento); }
.amapa-campo input[type=text], .amapa-campo input[type=url], .amapa-campo input[type=date], .amapa-campo input:not([type]), .amapa-campo select, .amapa-campo textarea {
	width: 100%; min-height: 54px; padding: 12px 16px; border-radius: var(--r-caja, 6px); border: 1.5px solid var(--borde);
	background: var(--fondo); color: var(--texto); font: inherit; font-size: 17px; transition: border-color .2s, box-shadow .2s;
}
.amapa-campo textarea { resize: vertical; min-height: 130px; }
.amapa-campo input:focus, .amapa-campo select:focus, .amapa-campo textarea:focus { outline: none; border-color: var(--acento); box-shadow: 0 0 0 4px color-mix(in srgb, var(--acento) 25%, transparent); }
.amapa-campo.es-invalido input, .amapa-campo.es-invalido textarea, .amapa-campo.es-invalido select, .amapa-campo.es-invalido .amapa-foto__zona { border-color: #FF8A8A; }
.amapa-campo__ayuda { font-size: 14px; line-height: 1.4; color: var(--suave); margin-top: -4px; }
.amapa-opciones .amapa-campo__ayuda { display: block; margin: 0 0 4px; }
.amapa-cuenta { align-self: flex-end; font-size: 14px; color: var(--suave); }
.amapa-opciones__lista { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.amapa-opcion { position: relative; cursor: pointer; }
.amapa-opcion input { position: absolute; opacity: 0; inset: 0; }
.amapa-opcion span {
	display: inline-flex; align-items: center; min-height: 50px; padding: 0 22px; border-radius: var(--r-chip, 3px); border: 1.5px solid var(--borde);
	font-weight: 600; transition: all .2s;
}
.amapa-opcion input:checked + span { background: var(--acento); border-color: var(--acento); color: #0A0A0A; }
.amapa-opcion input:focus-visible + span { outline: 3px solid var(--texto); outline-offset: 2px; }
.amapa-check { display: flex; align-items: center; gap: 12px; cursor: pointer; font-weight: 500; position: relative; min-height: 44px; }
.amapa-check input { position: absolute; opacity: 0; width: 26px; height: 26px; margin: 0; }
.amapa-check__caja { width: 26px; height: 26px; flex: none; border-radius: 8px; border: 2px solid var(--borde); display: grid; place-items: center; transition: all .2s; }
.amapa-check input:checked + .amapa-check__caja { background: var(--acento); border-color: var(--acento); }
.amapa-check input:checked + .amapa-check__caja::after { content: ''; width: 7px; height: 13px; border: solid #0A0A0A; border-width: 0 3px 3px 0; transform: rotate(45deg) translate(-1px, -1px); }
.amapa-check input:focus-visible + .amapa-check__caja { outline: 3px solid var(--texto); outline-offset: 2px; }

.amapa-foto__input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.amapa-foto__zona {
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 170px; padding: 24px;
	border: 2px dashed var(--borde); border-radius: var(--r-caja, 6px); text-align: center; cursor: pointer; color: var(--suave); transition: all .25s;
}
.amapa-foto__zona:hover, .amapa-foto__zona.es-arrastre { border-color: var(--acento); color: var(--texto); background: color-mix(in srgb, var(--acento) 8%, transparent); }
.amapa-foto__zona svg { color: var(--acento); }
.amapa-foto__texto { font-weight: 600; color: var(--texto); }
.amapa-foto__zona small { font-size: 14px; }
.amapa-foto__input:focus-visible + .amapa-foto__zona { outline: 3px solid var(--texto); outline-offset: 3px; }
.amapa-foto__vista { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.amapa-foto__vista[hidden], .amapa-foto__zona[hidden] { display: none; }
.amapa-foto__vista img { width: 220px; max-width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-caja, 6px); animation: amapa-aparecer .5s cubic-bezier(.2, .8, .2, 1); }

.amapa-trampa { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.amapa-form__privacidad { font-size: 15px; color: var(--suave); }
.amapa-form__pie { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.amapa-form__estado { font-weight: 500; font-size: 16px; }
.amapa-form__estado.es-error { color: #FFB1B1; }
.amapa--claro .amapa-form__estado.es-error { color: #B3261E; }
.amapa-form__estado.es-ok { color: var(--menta); }
.amapa-form__exito { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 24px 0; }
.amapa-form__exito[hidden] { display: none; }
.amapa-form__flor { width: 120px; height: 120px; }
.amapa-form__exito.es-celebrar .amapa-form__flor { animation: amapa-florecer 1.1s cubic-bezier(.2, .8, .2, 1) both; }
.amapa-form__exito h3 { font-size: clamp(22px, 3vw, 30px); line-height: 1.2; max-width: 560px; }
.amapa-form__enlace { width: 100%; max-width: 620px; border-radius: var(--r-caja, 6px); background: var(--fondo); padding: 18px; text-align: left; display: flex; flex-direction: column; gap: 12px; }
.amapa-form__enlace[hidden] { display: none; }
.amapa-form__copiar { display: flex; gap: 10px; flex-wrap: wrap; }
.amapa-form__copiar input { flex: 1 1 240px; min-height: 48px; border-radius: var(--r-caja, 6px); border: 1.5px solid var(--borde); background: var(--superficie); color: var(--texto); padding: 0 14px; font: inherit; font-size: 14px; }
.amapa-aviso { border-radius: var(--r-caja, 6px); padding: 14px 18px; margin-bottom: 18px; font-weight: 500; }
.amapa-aviso--error { background: #3A1518; color: #FFD3D3; }
.amapa-aviso--ok { background: color-mix(in srgb, var(--menta) 18%, transparent); color: var(--texto); }
.amapa-nota-admin { padding: 12px 16px; border: 1px dashed #999; border-radius: var(--r-caja, 6px); font-size: 14px; }

/* Tarjetas de notas */
.amapa-noticias__rejilla { display: grid; gap: 28px; }
.amapa-noticias--cuadricula .amapa-noticias__rejilla { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.amapa-noticias--destacada .amapa-noticias__rejilla { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); align-items: start; }
.amapa-noticias--destacada .amapa-tarjeta--grande { grid-row: span 6; }
.amapa-noticias--destacada .amapa-tarjeta:not(.amapa-tarjeta--grande) .amapa-tarjeta__enlace { flex-direction: row; align-items: center; gap: 18px; }
.amapa-noticias--destacada .amapa-tarjeta:not(.amapa-tarjeta--grande) .amapa-tarjeta__foto { flex: 0 0 140px; aspect-ratio: 1 / 1; border-radius: var(--r-caja, 6px); }
.amapa-noticias--destacada .amapa-tarjeta:not(.amapa-tarjeta--grande) .amapa-tarjeta__entrada { display: none; }
.amapa-noticias--destacada .amapa-tarjeta:not(.amapa-tarjeta--grande) { padding-bottom: 20px; border-bottom: 1px solid var(--borde); }
.amapa-noticias--lista .amapa-tarjeta__enlace { flex-direction: row; gap: 20px; align-items: center; }
.amapa-noticias--lista .amapa-tarjeta__foto { flex: 0 0 200px; aspect-ratio: 4 / 3; }
@media (max-width: 760px) {
	.amapa-noticias--destacada .amapa-noticias__rejilla { grid-template-columns: 1fr; }
	.amapa-noticias--lista .amapa-tarjeta__foto, .amapa-noticias--destacada .amapa-tarjeta:not(.amapa-tarjeta--grande) .amapa-tarjeta__foto { flex-basis: 110px; }
}

.amapa-tarjeta { position: relative; display: flex; flex-direction: column; min-width: 0; }
.amapa-tarjeta__enlace { display: flex; flex-direction: column; gap: 16px; text-decoration: none !important; color: inherit; }
.amapa-tarjeta__foto { display: block; overflow: hidden; border-radius: var(--radio); aspect-ratio: 16 / 10; background: var(--superficie); }
.amapa-tarjeta__foto img, .amapa-tarjeta__img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 1.2s cubic-bezier(.2, .8, .2, 1); }
.amapa-tarjeta:hover .amapa-tarjeta__img { transform: scale(1.05); }
.amapa-tarjeta__cuerpo { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.amapa-tarjeta__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.amapa-tarjeta__titulo { font-size: 21px; line-height: 1.2; transition: color .25s; }
.amapa-tarjeta--grande .amapa-tarjeta__titulo { font-size: clamp(28px, 3vw, 42px); line-height: 1.06; }
.amapa-tarjeta__titulo a { text-decoration: none; }
.amapa-tarjeta:hover .amapa-tarjeta__titulo { color: var(--acento); }
.amapa-tarjeta__entrada { color: var(--suave); font-size: 17px; }
.amapa-tarjeta--grande .amapa-tarjeta__entrada { font-size: 19px; }
.amapa-tarjeta__meta { color: var(--suave); font-size: 15px; }

/* Modo calma: notas sensibles cubiertas, animaciones en pausa */
.amapa-cubierta { display: none; }
.amapa-calma .amapa-sensible:not(.amapa-revelada) .amapa-cubierta {
	display: flex; position: absolute; inset: 0; z-index: 2; flex-direction: column; justify-content: center; align-items: flex-start; gap: 14px;
	padding: 24px; border-radius: var(--radio); background: #17161F; color: var(--crema); font-weight: 500;
}
.amapa-calma .amapa-sensible:not(.amapa-revelada) .amapa-cubierta .amapa-boton { --acento: var(--lila); color: var(--lila) !important; border-color: var(--lila); }
.amapa-calma .amapa *, .amapa-calma .amapa *::before { animation-play-state: paused !important; }
.amapa-calma .amapa img { filter: grayscale(.85); }
.amapa-calma-boton {
	display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: var(--r-chip, 3px); cursor: pointer;
	border: 1.5px solid var(--borde); background: transparent; color: var(--texto); font: inherit; font-weight: 600;
}
.amapa-calma-boton[aria-pressed=true] { background: var(--lila); border-color: var(--lila); color: #0A0A0A; }

/* Tableros comunitarios */
.amapa-tablero__rejilla { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 22px; }
.amapa-aporte { background: var(--superficie); border-radius: var(--radio); overflow: hidden; }
.amapa-aporte .amapa-tarjeta__foto { border-radius: 0; aspect-ratio: 4 / 3; }
.amapa-aporte .amapa-tarjeta__cuerpo { padding: 20px 22px 22px; }
.amapa-aporte--ficha .amapa-tarjeta__foto { aspect-ratio: 4 / 4.4; background: var(--lila); }
.amapa-tarjeta__foto--vacia { display: grid; place-items: center; padding: 20px; color: #0E0D14; font-weight: 600; text-align: center; }
.amapa-tarjeta__nombre { font-family: var(--amapa-titulos); font-size: 24px; line-height: 1.1; color: var(--texto); }
.amapa-tarjeta__dato { font-size: 16px; }
.amapa-tarjeta__valor { font-weight: 600; color: var(--amarillo); }
.amapa--claro .amapa-tarjeta__valor { color: #8A6A00; }
.amapa-tarjeta__acciones { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.amapa-etapas { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.amapa-etapas__paso { display: flex; flex-direction: column; gap: 6px; }
.amapa-etapas__barra { height: 7px; border-radius: 7px; background: var(--borde); }
.amapa-etapas__paso.hecha .amapa-etapas__barra, .amapa-etapas__paso.actual .amapa-etapas__barra { background: var(--acento); }
.amapa-etapas__paso.actual .amapa-etapas__barra { animation: amapa-latido 1.8s ease-in-out infinite; }
.amapa-etapas__nombre { font-size: 13px; color: var(--suave); }
.amapa-etapas__paso.actual .amapa-etapas__nombre, .amapa-etapas__paso.hecha .amapa-etapas__nombre { color: var(--texto); font-weight: 600; }
.amapa-info { width: 100%; }
.amapa-info summary { list-style: none; }
.amapa-info summary::-webkit-details-marker { display: none; }
.amapa-info__caja { margin-top: 12px; padding: 16px 18px; border-radius: var(--r-caja, 6px); background: var(--fondo); font-size: 15px; }
.amapa-info__caja ul { margin: 8px 0 0; padding-left: 18px; }
.amapa-vacio { color: var(--suave); }
.amapa-sola { margin-bottom: 28px; }
.amapa-aporte--sola { background: var(--superficie); }

/* Ventana «Me interesa» / «La vi» */
.amapa-dialogo { width: min(560px, calc(100vw - 32px)); border: 0; border-radius: var(--r-caja, 6px); padding: 30px; background: var(--superficie); color: var(--texto); }
.amapa-dialogo::backdrop { background: rgba(10, 10, 10, .7); backdrop-filter: blur(6px); }
.amapa-dialogo[open] { animation: amapa-aparecer .4s cubic-bezier(.2, .8, .2, 1); }
.amapa-dialogo h3 { font-size: 24px; line-height: 1.2; margin: 12px 0 8px; }
.amapa-dialogo__ayuda { color: var(--suave); margin-bottom: 18px !important; }
.amapa-dialogo__form { display: flex; flex-direction: column; gap: 16px; }
.amapa-dialogo__cerrar-form { position: absolute; top: 14px; right: 14px; margin: 0; }
.amapa-dialogo__cerrar { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--borde); background: transparent; color: var(--texto); font-size: 24px; cursor: pointer; }

/* Canción de la semana */
.amapa-cancion { display: flex; flex-wrap: wrap; gap: clamp(28px, 5vw, 64px); align-items: center; background: var(--superficie); border-radius: var(--r-caja, 6px); padding: clamp(22px, 4vw, 56px); }
.amapa-cancion__arte { position: relative; flex: 0 0 auto; width: min(380px, 100%); aspect-ratio: 1 / 1; }
.amapa-cancion__portada { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; border-radius: var(--r-caja, 6px); box-shadow: 0 30px 70px rgba(0, 0, 0, .45); }
.amapa-cancion__disco {
	position: absolute; top: 6%; left: 0; width: 88%; aspect-ratio: 1 / 1; border-radius: 50%;
	background: radial-gradient(circle, var(--rosa) 0 15%, #111 15.5% 17%, transparent 17.5%), repeating-radial-gradient(circle, #111 0 2px, #1d1d22 2px 4px);
	transform: translateX(30%); animation: amapa-girar 3.6s linear infinite;
}
.amapa-cancion__info { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.amapa-cancion__titulo { font-size: clamp(32px, 4vw, 54px); line-height: 1; }
.amapa-cancion__artista { font-size: 20px; color: var(--suave); }
.amapa-cancion__por-que { font-size: 18px; max-width: 620px; }
.amapa-cancion__reproductor { width: 100%; }
.amapa-cancion__reproductor iframe { width: 100%; border-radius: var(--r-caja, 6px); border: 0; }

/* Lo que sabemos / Lo que aún no */
.amapa-sabemos { display: flex; flex-wrap: wrap; gap: 14px; margin: 0 0 32px; }
.amapa-sabemos__col { flex: 1 1 260px; background: var(--superficie); border-radius: var(--r-caja, 6px); padding: 20px 24px; }
.amapa-sabemos__col h2 { font-size: 18px; margin: 0 0 10px; }
.amapa-sabemos__col--si h2 { color: var(--menta); }
.amapa-sabemos__col--no h2 { color: var(--amarillo); }
.amapa--claro .amapa-sabemos__col--si h2 { color: #14843F; }
.amapa--claro .amapa-sabemos__col--no h2 { color: #8A6A00; }
.amapa-sabemos__col ul { margin: 0; padding-left: 20px; }
.amapa-sabemos__col li { margin: 4px 0; }

/* Cinta Ciudad abierta */
.amapa-cinta { display: flex; align-items: stretch; overflow: hidden; background: #0F0F0F; color: #DADADA; border-bottom: 1px solid #222; }
.amapa-cinta__titulo { flex: none; display: flex; align-items: center; gap: 10px; padding: 0 20px; background: #0A0A0A; color: #2ED47A; font-family: var(--amapa-titulos); font-weight: 700; font-size: 15px; letter-spacing: .06em; text-transform: uppercase; position: relative; z-index: 1; border-right: 1px solid #222; }
.amapa-cinta__punto { width: 8px; height: 8px; border-radius: 50%; background: #2ED47A; animation: amapa-latido 1.8s infinite; }
.amapa-cinta__pista { overflow: hidden; flex: 1; }
.amapa-cinta__mover { display: flex; width: max-content; animation: amapa-cinta 46s linear infinite; }
.amapa-cinta__copia { display: flex; }
.amapa-cinta__item { padding: 10px 26px; font-weight: 500; font-size: 14px; white-space: nowrap; border-right: 1px solid #262626; }
.amapa-cinta:hover .amapa-cinta__mover { animation-play-state: paused; }

/* Página privada para elegir */
.amapa-elegir-pagina { background: var(--fondo); padding: 48px 16px 80px; }
.amapa-elegir { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.amapa-elegir__cabeza { display: flex; flex-wrap: wrap; gap: 22px; align-items: center; }
.amapa-elegir__cabeza img { width: 140px; height: 140px; object-fit: cover; border-radius: var(--r-caja, 6px); }
.amapa-elegir__cabeza h1 { font-family: var(--amapa-titulos); font-size: clamp(28px, 4vw, 42px); line-height: 1.05; margin: 10px 0 6px; color: var(--texto); }
.amapa-elegir__estado { color: var(--suave); }
.amapa-elegir__titulo { font-size: 24px; }
.amapa-elegir__lista { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.amapa-elegir__persona { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; padding: 20px 22px; border-radius: var(--r-caja, 6px); background: var(--superficie); }
.amapa-elegir__persona.es-elegida { outline: 2px solid var(--menta); }
.amapa-elegir__avatar { width: 48px; height: 48px; flex: none; border-radius: 50%; background: var(--rosa); color: #0A0A0A; display: grid; place-items: center; font-family: var(--amapa-titulos); font-weight: 800; }
.amapa-elegir__texto { flex: 1 1 280px; display: flex; flex-direction: column; gap: 6px; }
.amapa-elegir__fecha { font-size: 14px; color: var(--suave); }
.amapa-elegir__consejos { padding: 16px 20px; border-radius: var(--r-caja, 6px); background: var(--amarillo); color: #0A0A0A; }
.amapa-elegir__vacio { padding: 32px; border-radius: var(--r-caja, 6px); background: var(--superficie); text-align: center; }
.amapa-elegir__vacio h1, .amapa-elegir__vacio h2 { font-family: var(--amapa-titulos); color: var(--texto); margin: 0 0 8px; }

/* Animaciones */
@keyframes amapa-girar { to { transform: translateX(var(--x, 0)) rotate(360deg); } }
.amapa-cancion__disco { --x: 30%; }
@keyframes amapa-aparecer { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes amapa-florecer { 0% { transform: scale(.2) rotate(-90deg); opacity: 0; } 70% { transform: scale(1.08) rotate(8deg); opacity: 1; } 100% { transform: none; } }
@keyframes amapa-latido { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
@keyframes amapa-cinta { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
	.amapa *, .amapa *::before, .amapa *::after { animation: none !important; transition: none !important; }
}

/* ---------- Mapas ---------- */
.amapa-mapa { background: var(--fondo); padding: clamp(16px, 2.5vw, 28px); border-radius: var(--r-caja, 6px); display: flex; flex-direction: column; gap: 16px; }
.amapa-mapa__lienzo, .amapa-ubicacion__mapa, .amapa-mapa-mini { width: 100%; border-radius: var(--r-caja, 6px); overflow: hidden; background: #1d2026; z-index: 0; }
.amapa-ubicacion__mapa { height: 300px; border: 1px solid var(--borde); cursor: crosshair; }
.amapa-mapa-mini { height: 240px; margin-top: 14px; }
.amapa-mapa-mini__abrir { font-size: 14px; margin-top: 8px !important; }
.amapa-mapa-mini__abrir a { color: var(--suave); }
/* Colores del mapa (Ajustes › Mapas): claro a color por defecto; «oscuro» invierte las teselas de OpenStreetMap. */
.amapa-mapa--base-oscuro .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.92) contrast(.9) saturate(.55); }
.amapa .leaflet-container { font: 500 14px/1.4 'Inter', system-ui, sans-serif; background: #1d2026; }
.amapa .leaflet-container.amapa-mapa--base-color { background: #EEF0EA; }
.amapa .leaflet-container.amapa-mapa--base-gris { background: #F2F2F0; }
.amapa-mapa--base-gris .leaflet-tile-pane { filter: grayscale(1) contrast(1.05); }
.amapa .leaflet-control-attribution { background: rgba(10, 10, 10, .7); color: #BDBDBD; font-size: 11px; }
.amapa .leaflet-control-attribution a { color: #F5F5F5; }
.amapa .leaflet-bar a { background: #151515; color: #F5F5F5; border-bottom-color: rgba(255, 255, 255, .12); width: 36px; height: 36px; line-height: 36px; }
.amapa .leaflet-bar a:hover { background: #24262c; }
.amapa--claro .leaflet-bar a { background: #fff; color: #0A0A0A; }
.amapa-pin span { display: block; width: 30px; height: 30px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--pin); border: 3px solid #0A0A0A; box-shadow: 0 6px 14px rgba(0, 0, 0, .45); transition: transform .25s; }
.amapa-pin:hover span, .amapa-pin:focus span { transform: rotate(-45deg) scale(1.15); }
.amapa-pin.es-elegido span { animation: amapa-cae-pin .45s cubic-bezier(.2, .8, .2, 1); }
.amapa-pin.es-resuelto span::after { content: "✓"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; transform: rotate(45deg); color: #0A0A0A; font-weight: 800; font-size: 14px; }
.amapa-pin span { position: relative; }
@keyframes amapa-cae-pin { from { transform: translateY(-24px) rotate(-45deg); opacity: 0; } to { transform: rotate(-45deg); opacity: 1; } }
.amapa .leaflet-popup-content-wrapper { background: #151515; color: #F5F5F5; border-radius: var(--r-caja, 6px); box-shadow: 0 18px 40px rgba(0, 0, 0, .5); }
.amapa .leaflet-popup-tip { background: #151515; }
.amapa .leaflet-popup-content { margin: 14px 16px; }
.amapa .leaflet-container a.leaflet-popup-close-button { color: #BDBDBD; }
.amapa-globo { display: flex; flex-direction: column; gap: 6px; }
.amapa-globo img { width: 100%; height: 110px; object-fit: cover; border-radius: var(--r-caja, 6px); }
.amapa-globo__chip { align-self: flex-start; padding: 3px 10px; border-radius: var(--r-chip, 3px); background: var(--chip); color: #0A0A0A; font-weight: 600; font-size: 12px; }
.amapa-globo strong { font-family: var(--amapa-titulos); font-size: 15px; line-height: 1.25; }
.amapa-globo span { color: #BDBDBD; font-size: 13px; }
.amapa-globo a { color: #FFC400 !important; font-weight: 600; }
.amapa-mapa__leyenda { display: flex; flex-wrap: wrap; gap: 8px; }
.amapa-mapa__filtro { min-height: 40px; display: inline-flex; align-items: center; gap: 8px; padding: 0 14px; border-radius: var(--r-chip, 3px); border: 1px solid var(--borde); background: transparent; color: var(--texto); font: 600 14px 'Inter', system-ui, sans-serif; cursor: pointer; transition: opacity .25s; }
.amapa-mapa__filtro span { width: 12px; height: 12px; border-radius: 50%; background: var(--chip); }
.amapa-mapa__filtro b { font-weight: 500; color: var(--suave); }
.amapa-mapa__filtro[aria-pressed="false"] { opacity: .45; text-decoration: line-through; }
.amapa-mapa__lista summary { cursor: pointer; color: var(--suave); font-size: 15px; }
.amapa-mapa__lista ul { margin: 10px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
.amapa-mapa__lista li span { color: var(--suave); }

/* Elegir un punto en el formulario */
.amapa-ubicacion { display: flex; flex-direction: column; gap: 10px; }
.amapa-ubicacion__etiqueta { font-weight: 600; }
.amapa-ubicacion__ayuda { color: var(--suave); font-size: 14px; }
.amapa-ubicacion__acciones { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.amapa-ubicacion__acciones .amapa-boton { display: inline-flex; gap: 8px; align-items: center; }
.amapa-ubicacion__estado { color: var(--suave); font-size: 14px; flex: 1 1 200px; }
.amapa-ubicacion.tiene-punto .amapa-ubicacion__estado { color: var(--menta); }
.amapa-ubicacion.tiene-punto .amapa-ubicacion__mapa { border-color: var(--menta); }

/* ---------- Recreación ---------- */
.amapa-plan__cuando { font-weight: 600; color: var(--texto); }
.amapa-plan__datos { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.amapa-plan__datos li { padding: 4px 10px; border-radius: var(--r-chip, 3px); border: 1px solid var(--borde); font-size: 13px; color: var(--suave); }
.amapa-plan__datos li.es-gratis { border-color: var(--menta); color: var(--menta); }
.amapa-apunto { display: inline-flex; align-items: center; gap: 8px; }
.amapa-apunto[aria-pressed="true"] { background: var(--menta) !important; border-color: var(--menta) !important; }
.amapa-apunto__n:empty { display: none; }
.amapa-apunto__n { min-width: 24px; height: 24px; padding: 0 7px; border-radius: var(--r-chip, 3px); background: rgba(10, 10, 10, .18); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; }
.amapa-apunto.es-latido { animation: amapa-latido .45s cubic-bezier(.2, .8, .2, 1); }
@keyframes amapa-latido { 0% { transform: scale(.9); } 55% { transform: scale(1.08); } 100% { transform: scale(1); } }

/* Reporte resuelto: se celebra */
.amapa-resuelto { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; padding: 8px 14px; border-radius: var(--r-chip, 3px); background: var(--menta); color: #0A0A0A; font-weight: 700; font-size: 14px; animation: amapa-latido .6s cubic-bezier(.2, .8, .2, 1) both; }
.amapa-resuelto span { display: inline-block; animation: amapa-gira-resuelto 4s linear infinite; }
@keyframes amapa-gira-resuelto { to { transform: rotate(360deg); } }
.amapa-aporte.es-resuelto { box-shadow: 0 0 0 2px var(--menta); }
@media (prefers-reduced-motion: reduce) { .amapa-resuelto, .amapa-resuelto span, .amapa-apunto.es-latido, .amapa-pin.es-elegido span { animation: none; } }
.amapa-calma .amapa-resuelto span { animation: none; }

/* Mapa vectorial (OpenFreeMap): ya trae sus colores, no se filtra. */
.amapa-mapa--vectorial .leaflet-tile-pane, .amapa--oscuro .amapa-mapa--vectorial .leaflet-tile-pane { filter: none !important; }
.amapa-mapa--vectorial .maplibregl-canvas { outline: none; }
.amapa-mapa__aviso { position: absolute; z-index: 800; left: 50%; top: 50%; transform: translate(-50%, -50%); margin: 0; max-width: min(340px, 86%); padding: 12px 16px; border-radius: var(--r-caja, 6px); background: rgba(10, 10, 10, .88); color: #F5F5F5; font-size: 14px; line-height: 1.4; text-align: center; pointer-events: none; }
.amapa--oscuro .leaflet-control-attribution, .amapa--oscuro .leaflet-container .leaflet-control-attribution { background: rgba(10, 10, 10, .78); color: #BDBDBD; }
.amapa--oscuro .leaflet-control-attribution a { color: #F5F5F5; }

/* ---------- Huellas · adopción y esquelas con adornos de Día de Muertos ---------- */
.amapa-tarjeta__datos { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.amapa-tarjeta__datos li { padding: 4px 9px; border-radius: var(--r-chip, 3px); background: rgba(61, 169, 252, .14); color: #8CCBFF; font-size: 13px; font-weight: 600; }
.amapa-tarjeta__fechas { margin: 4px 0 0; color: #FFC400; font: 700 18px/1.2 'Barlow Condensed', sans-serif; letter-spacing: .04em; }
.amapa-aporte--memoria { background: linear-gradient(180deg, #24133B, #140A22) !important; border-color: #3A2257 !important; }
.amapa-memoria-marco { position: relative; display: block; overflow: hidden; isolation: isolate; }
.amapa-memoria-marco img { filter: sepia(.22) saturate(1.08); }
.amapa-memoria-marco::after { content: ''; position: absolute; inset: 0; z-index: 1; box-shadow: inset 0 0 0 5px #FF8A1F, inset 0 0 0 9px #FFC400, inset 0 -60px 60px -20px rgba(20, 10, 34, .7); pointer-events: none; }
.amapa-memoria__papel { position: absolute; left: 0; right: 0; top: 0; z-index: 2; height: 58px; background: url(../img/papel-picado.svg) repeat-x 0 0 / auto 58px; pointer-events: none; }
.amapa-memoria__flor { position: absolute; bottom: -8px; z-index: 2; width: 42%; max-width: 190px; aspect-ratio: 200 / 140; background: url(../img/cempasuchil.svg) no-repeat center / contain; pointer-events: none; }
.amapa-memoria__flor--izq { left: -14px; }
.amapa-memoria__flor--der { right: -14px; transform: scaleX(-1); }
.amapa-memoria__vela { position: absolute; left: 50%; bottom: 10px; z-index: 2; width: 22px; height: 38px; margin-left: -11px; background: url(../img/veladora.svg) no-repeat center / contain; pointer-events: none; animation: amapa-vela 2.4s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes amapa-vela { 50% { transform: scaleY(1.04) rotate(1deg); } }
@media (prefers-reduced-motion: reduce) { .amapa-memoria__vela { animation: none; } }
.amapa-calma .amapa-memoria__vela { animation: none; }
/* En el formulario: el marco solo aparece si el aviso es «En memoria». */
.amapa-foto__marco { position: relative; display: inline-block; overflow: hidden; border-radius: var(--r-caja, 6px); line-height: 0; }
.amapa-foto__marco img { width: 260px; }
.amapa-foto__marco .amapa-memoria__papel, .amapa-foto__marco .amapa-memoria__flor, .amapa-foto__marco .amapa-memoria__vela { display: none; }
.es-memoria .amapa-foto__marco { box-shadow: 0 0 0 4px #FF8A1F, 0 0 0 8px #FFC400; margin: 8px; }
.es-memoria .amapa-foto__marco img { filter: sepia(.22) saturate(1.08); border-radius: 0; }
.es-memoria .amapa-foto__marco .amapa-memoria__papel, .es-memoria .amapa-foto__marco .amapa-memoria__flor, .es-memoria .amapa-foto__marco .amapa-memoria__vela { display: block; }
.es-memoria .amapa-foto__marco .amapa-memoria__papel { height: 40px; background-size: auto 40px; }
.es-memoria .amapa-foto__marco .amapa-memoria__flor { max-width: 110px; }
