added viewport rules to improve cross-platform capabilities