14. Responsive design with media queries
Phones and laptops have different widths. A media query applies rules only when a condition is true. @media (max-width: 600px) { ... } applies the rules inside only on narrow screens.
Design for small screens first, then add rules for wider ones. That keeps the page usable everywhere.
Show example
@media (max-width: 600px) {
.row {
flex-direction: column;
}
}
✍️ Your turn
Inside a media query for max-width 480px, make .box background coral.