The device toolbar and the phone disagree
Locate the failed assumption, reproduce it, then repair the cause.
What actually caused it
The device toolbar changes the layout inside DevTools. It does not, by itself, prove what a phone will do. Without a viewport meta element, mobile browsers often lay the page out around 980 CSS pixels and scale it down. A desktop window that you merely made narrow can still have the meta element and look fine, while the phone zooms out.
The toolbar can also set a device pixel ratio and a user agent. It does not add a real on-screen keyboard, browser chrome, or touch delay unless you use those extra controls. Responsive mode is a width experiment. It is not a device lab.
use the layout . If that viewport is the fallback 980 pixels, a max-width query for a phone never matches. The page looks like the query is broken. The head is what is broken.
Minimal reproduction
No viewport contract
<!DOCTYPE html>
<html lang="en">
<head>
<title>Plot notes</title>
</head>
<body>
<main><h1>Plot notes</h1></main>
</body>
</html>Phones may lay this out at a wide fallback width and scale it.
The fix
Add meta name= with width=device-width, initial-scale=1 in the head. Reload, then use the device toolbar to drag across widths and watch for overflow. Confirm the meta element in the Elements panel so you know the toolbar is not hiding its absence.
When the toolbar and a real phone disagree, compare the meta element, the text size setting, and any transform that creates a containing block. Do not keep a list of device widths as the design. Let the content wrap, and add a min-width query when a wider arrangement helps.
Set the layout width to the device
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Plot notes</title>
</head>
<body>
<main><h1>Plot notes</h1></main>
</body>
</html>