Karlstejn is a Gothic castle built by Emperor Charles IV in the 14th century, 28 km southwest of Prague in the Czech Republic.