Packing confined hard spheres denser with adaptive prism phases