My plan in Puerto Iguazu was to see the falls for half a day, then take a bus across the border into Brazil and catch the next long-distance bus somewhere fun. I was on schedule leaving the park, caught the bus, and made sure to tell the driver that I needed to stop at Brazilian customs (otherwise, they drive through). I got off, filled out the form, and waited in line. When I got to the window, the guy kept flipping through my passport before saying something I couldn't understand. He passed it to the other officer: "American citizens need a visa to enter Brazil. You have go back. I'm sorry."
I found out I could get a visa in Puerto Iguazu the next day. So with tears in my eyes, I went back out to wait for the next bus. After a little while, one of the taxi drivers came over and we talked in Spanish. Where was I headed? No, the last bus to the terminal already passed. You'd better take a taxi. Look, there's one over here!
I got in and he drove away from the customs post, with a wink to the other taxi. He was charging me an illegally high rate, but I didn't know it at the time. As we drove into town, it dawned on me that all of the signs were in Portuguese.
At the bus terminal in Brazil, I confirmed that there were no more buses, and I needed to take another expensive taxi back. "Tell the driver not to stop at the border to Brazil, because you're currently illegal." I got a taxi and told the driver. He seemed uncomfortable about it, but said okay. A guard was watching as we approached the border post, and we slowed down. At the last second, the guard looked down at his cellphone, and we slid on by.
I got the ungodly expensive visa the next day (payable only in large unmarked bills). I think it was the last one they accepted that day for same-day issue. My next stop: Florianopolis.