Added mobile detection to allow robust HTML displays