How do you keep content out of the iPhone notch and safe areas?

Use CSS safe-area environment variables to keep important content away from display cutouts, rounded corners and the home indicator. A full-bleed design can extend its background to the screen edge while adding padding for controls and readable content. Safe-area values change with device and orientation.
Enable edge-to-edge viewport coverage where required, then apply env(safe-area-inset-top), right, bottom and left. Combine them with the design’s normal spacing because a safe-area value can be zero.
.app-shell {
padding-top: max(1rem, env(safe-area-inset-top));
padding-right: max(1rem, env(safe-area-inset-right));
padding-bottom: max(1rem, env(safe-area-inset-bottom));
padding-left: max(1rem, env(safe-area-inset-left));
}
Fixed headers, bottom bars, dialog close buttons and carousel controls deserve special attention. Decorative backgrounds can occupy unsafe space, but interactive targets and text should stay inside it. Do not hard-code a notch height or identify one iPhone model; future devices and installed web apps can expose different insets.
Test portrait and landscape on a cutout device or accurate simulator. Rotate while overlays are open and check browser mode as well as an installed web app if supported. Safe areas prevent physical obstruction, while normal target spacing and viewport testing still determine whether controls are comfortable to use. Recheck the component after font, spacing or browser-support changes. Responsive failures often return when a shared token changes, so the test should cover the limiting content state instead of one ideal screenshot. Verify the final behavior across the full width range, including the spaces between preset devices and design breakpoints. Long labels, translated copy and enlarged text often reveal constraints that short demo content does not exercise.