Add @media rules for small screens

Adds some rules for smaller viewports.

This also brought up an issue with content potentially being hidden if overflowing, which was fixed too (the #footer display:block section relates to that).

This appears to work nicely, but I don't have one of those fancy phones or tablets to test it with.

I used em rather than px measurements for screen width, as that seemed like a more sensible thing to test, plus some phones apparently misreport their pixel widths for the sake of "compatibility". If there are reasons against doing this, do let me know!

Change-Id: I6d3bcbf1538f4ae640709fbba45a4c1b7b2e6739