/* Keep desktop control-room minimum widths out of the mobile grid. */
@media (max-width: 1050px) {
  .topbar { grid-template-columns: minmax(0, 1fr) auto !important; }
}
@media (max-width: 700px) {
  html, body { overflow-x: hidden; }
  .topbar { position: absolute; gap: 8px; }
  .topbar h1 { font-size: 17px; overflow-wrap: anywhere; }
  .topbar p { line-height: 1.4; }
  .topbar .status { padding: 7px; font-size: 9px; white-space: normal; max-width: 95px; }
  .control-room-status { min-width: 0; }
  .panel { top: var(--rw-topbar-bottom, 260px); max-height: 35vh; overflow-y: auto; box-sizing: border-box; }
  .feed { top: auto; bottom: 10px; max-height: 22vh; }
  .rw-journey-guide { top: var(--rw-topbar-bottom, 260px); left: 12px; right: 12px; transform: none; width: auto; min-width: 0; max-height: 62vh; overflow-y: auto; }
  #railwatch-ops-assurance { display: none; }
  .rw-workspace-dock { max-height: 80px; overflow-y: auto; }
}
@media (max-width: 700px) {
  #incident-popover { left: 12px !important; right: 12px !important; top: 92px !important; bottom: auto !important; transform: none !important; width: calc(100vw - 24px) !important; max-width: calc(100vw - 24px) !important; max-height: calc(100dvh - 110px) !important; margin: 0 !important; }
  .asset-operator { max-width: calc(100vw - 24px); box-sizing: border-box; }
  #incident-popover .rw-workspace-toolbar { flex-wrap: wrap; }
}
@media (min-width: 701px) and (max-width: 900px) {
  .feed { top: var(--rw-topbar-bottom, 200px); }
}
