So I built it over the weekend, and I'm really happy with how it turned out.
I ended up deciding to mount the edge all the way to the metal stud. I put in a 1x2 to help fill the gap between the paneling and the insulation (still probably 3/8" gap) and drilled a hole into the stud for a 3" lag bolt. I was surprised how sturdy it was, even without the legs. I know it's a thermal bridge, and I potentially messed up parts of my insulation in the wall, but it think it's worth it for the extra support.
We built the frame inside the bus, which allowed us to get everything to be the exact length we needed. It wasn't perfectly square (about 3/4" shorter in the back) but the middle splits are all straight. After getting the edges and the middle two splits, we were ready for the posts.I don't know if it's because the bus is not level, but this picture makes the bed look really crooked. I swear it's straight.
You can see how we cut the posts to accommodate the rail and a split. The way I cut it, the depth was controlled by the height of the circular saw, and I just made cuts every 1/4" or so. This left me with shims that I ended up gluing into place before screwing the posts to the frame to be perfectly flush to the rail. (My dad came up to help with this, and I am hugely grateful that I didn't have to do it myself.)
I put some thin plywood on top and tacked it down to help spread the weight of the mattress. It's only 5mm underlayment, and I might eventually do something more sturdy, but I think it will be fine with the mattress up there.
You can see in the back corner, that I actually fit the plywood to wrap around the wall. This was mostly because we had plenty of length and had to cut a non-square edge, but this is going to keep me from dropping my phone at some point.
It's very high. If I was doing it again I might drop it 6", but it doesn't feel claustrophobic, and my dog is already a big fan, so not going to change it. Plus we have so much room for storage underneath.
It really is quite cozy. Now to cover up the ugly front of the bus to make the view a bit better.