Most definitely Portofino would be a good stop, it is north of the Cinque Terre. Florence makes a good base to start off, but you can definitely leave visiting it to the end of your 10 days if you wish (June 24th is a big city celebration for St. John the Baptist so there is a parade in historical costume, the Calcio Storico Fiorentino final match and fireworks once it gets dark - if you can be here for that, I think you would love it! So if you still can, try to plan around that date being here).
Yep, I would recommend you look at the map and see distances to plan an itinerary. Places here are close to each other but there is a lot of things to see at each place, so I recommend trying to see less in order to enjoy everything more ;-). Let me know what you come up with, I can offer feedback on your ideas before you make definite plans.
As for rail tickets, I don't recommend getting them in advance since you'll be doing mostly regional trains and those do not offer advantages to booking ahead, including no assigned seating. So all you need to do is arrive ahead of time and get on train early on. Nowadays, the easiest is to download the app for Trenitalia and that allows you to buy tickets on the app without need of doing any lines whatsoever, or needing to "validate" the tickets with a machine, you do it directly in the app.