Rick
We are all rookies every time an issue pops up that is new to us. This is one for me so I can only relate this to what I would do in a home. The tail piece has to be longer if the flange is moved up. If the toilet flange is in its original place but the toilet is raised to the marble tile level , the gap is there. Clearly the problem is preexisting with the filler around the pipe through the floor.
Hope this helps! Welcome to the Beaver family.
David
Good call on the loose screws in wood floor. If it holds up, great. If you do have problems, try a product called ' Rock Hard Putty' when set it is so tough it will hold those screws even under those conditions.