Allow a device width up to 630 pixels for mobile mode, and correctly handle portrait and landscape mode.

Signed-off-by: Guillaume Clement <gclement@baobob.org>