

What visas do i need?
I am travelling to Guangzhou for a summer camp and have begun the process of applying for a student visa for Hong Kong.
My itinerary is as follows:
Outbound Journey:
I fly from Edinburgh Airport (EDI) to Guangzhou Baiyun International Airport (CAN), with a 31.5-hour layover at Beijing Capital International Airport (PEK).
During this long layover, I plan to leave the airport and stay at a hotel in Beijing.
Return Journey:
After spending two weeks in Hong Kong, I return to Edinburgh from Guangzhou (CAN), with an 8-hour 55-minute layover again at Beijing Capital International Airport (PEK).
Do I need a visa to leave the airport and stay at a hotel during my 31.5-hour layover in Beijing?
After visiting Hong Kong, will I need a separate visa to re-enter mainland China (via Guangzhou) for my return flight to Edinburgh?