I thought through the UI and tech stack and reasearched what would actually work first and then wrote a very detailed brief for Codex. And about 2 hours of back and forth and re-thinking later, it works.
One challenge was that the phone has to have the NFC UI on while looking for cards, but i wanted it to turn off while playing so I could have a hole in the box to a blank screen she can swipe to skip back and forward.
This stumped Codex - but I then had the idea to use the depth cam to detect cards placed on the phone, then only show the scan UI again when the card is removed.
So now it works really seamlessly.
1) Place card on, music instantly starts, even remembers where in the song and playlist you are.
2) Remove card, phone detects it can see at least a few cm, instant stop.
3) Place a new, or the same card on and that instantly plays from the last position.