New layout mostly finished

The layout is now (structurally) in a form which shows almost all site
functionality.

Style-wise, it still has a ways to go, of course - but the majority of
this style can be manipulated using only css without messing with the
javascript.

Known bug: flip functionality is triggered multiple times per click; the
same number as the number of times card_viewer has been opened. This
causes incorrect flipping. Trying to fix this now.