The problem, as it turned out, was indeed the foreclosure. Without that, everything was a bit pricey, but an order of magnitude lower.
And the problem with the foreclosure was not what appears to have been expected, which is probably why I got one very nasty value, that as far as I can tell is a TurboTax bug.
The big "foreclosure relief" thing that's been in the news is about the cancellation of debt. That occurs when (among other things) the bank forecloses, and the amount of debt forgiven is larger than the fair market value of the property. The difference between the two is the canceled debt, and is... less taxable by the feds, and completely taxable by California.
My fair market value was about $70k more than the forgiven debt. So no problem there.
However, the foreclosure still counts as a sale, only a certain amount of capital gains is forgiven, and I had that house for a long time.
It it had been a normal sale, I would have had the actual, y'know, money with which to pay the taxes. But not in this case.
So, unless I've done something terribly wrong, the feds want me to pay them $13k, while the state wants a mere $8k. This is the sum total of what I've got in my IRA, at least if one ignores the, y'know, 10% withdrawal penalty, not to mention taxes on that.
This is at least an improvement over a few minutes ago, when the TurboTax CA adjustment pulled a number, apparently out of thin air, for the cancellation of debt, and threw a $350k adjustment into the CA taxes.
That had me owing the state a mere $41k...
There are a few things I still need to look into. Perhaps I can (legally) get this down to a manageable size yet...