What's really happening? (for the curious)
How the draw works. It's the same as names in a hat. The page puts everyone's name in a list and shuffles it, then lines the shuffled list up against the original: the first person buys for the first name in the shuffled list, the second for the second, and so on. This is sometimes called a Secret Santa generator.
Why you never get yourself. After each shuffle, the page checks every person. If anyone has drawn their own name, or someone they should be kept apart from, it throws the whole shuffle away and shuffles again, just like putting all the names back in the hat. That sounds wasteful, but a computer can do thousands of shuffles in the blink of an eye. Starting again from scratch (rather than just swapping two people) is what keeps it fair: every allowed result is equally likely.
When it can't be done. Some "keep apart" choices leave no way to give everyone someone. For example, with only three people, if Siân and Dafydd are kept apart, both of them would have to buy for the third person. Before shuffling, the page checks whether a draw is possible at all, and if it isn't, it tells you which pair to take out.
What "random" means on a computer. Computers are very good at following instructions exactly, which makes it hard for them to be truly unpredictable. Many web pages use a quick shortcut (called Math.random) that's fine for games but follows a pattern underneath. This page uses your browser's stronger built-in source, crypto.getRandomValues, the same kind used to keep online banking safe. It mixes in tiny unpredictable things happening inside your device, so nobody (including me) can predict or steer the draw.
The private links. A web address can have a part after a # sign, called the fragment. Web browsers never send that part to the website: it stays on the phone or computer that opens the link. Each private link puts that person's result after the #, so it never reaches my website or any other. It's written in a jumbled-looking code (called base64) so a quick glance at the link doesn't spoil the surprise, but it isn't a password: anyone who has the link can open it.
Nothing is kept. While this tab is open, the page keeps a copy of the draw in the browser's "session storage", so if the page is refreshed in the middle of passing the phone round, nothing is lost. It's wiped as soon as you close the tab. There are no cookies, and nothing is saved on your device after that.
All of this happens inside your web browser (the program you're using to view this page, such as Chrome, Edge or Safari). Nothing is sent anywhere.