Unfortunately, what you have drawn won't fit on a door of 36" or lesser width. The track diameter is 27", and switches S2 and S3 add another 9", for a total of 36". This means your track will be right on the door edge, or hanging over.
On my 027 and 0 layouts, I allowed an absolute minimum of 1.5" between the track and the table edge, and preferred about 3" to ensure my trains did not go into floor-seeking mode of animation.
If you rotate S2 to point NE and S3 to point NW, you will reduce the overall width of the track to 33.5", which still isn't really narrow enough. You need a wider table, or you need to leave off the siding with the raised trestle.
By the way, a 39" x75" layout will fit under most twin beds. The extra width will allow you to fit your plan, especially if S2 and S3 are rotated 45 degrees. But the shorter length would eliminate the expansion at S7.
my thoughts, your choices