It looks like you're new here. If you want to get involved, click one of these buttons!
[The [single-node NPC]<sNPC| is looking at you expectantly.
(click: ?sNPC)[The NPC seems to be waiting for you to [talk]<sNtalk| to it. You could, however, decide to [ignore]<sNignore| it instead. You could also attempt to [teach it how to dance]<sNdance|.]]<passage1|
{ [(click: ?sNtalk)[(replace: ?passage1)[You start making small talk with the NPC.]]
(click: ?sNignore)[(replace: ?passage1)[You turn away and pretend not to notice the NPC, though you can still see its dejected expression out of the corner of your eye.]]
(click: ?sNdance)[(replace: ?passage1)[You offer to teach the NPC how to dance - it enthusiastically agrees. Do you want to [tango]<tango|, [slow dance]<slowdance| or [breakdance]<breakdance|?]]]<passage2| }
{ (click: ?tango)[(replace: ?passage2)[You dance a passionate tango with the NPC. (set: $mood to "romantic") The NPC is growing fatigued from all this energetic dancing. Will you allow it to [take a break]<break|, or force it to [continue]<continue|? ]]
(click: ?slowdance)[(replace: ?passage2)[You gingerly wrap your arms around the NPC and start swaying around in a soft rythm.]]
(click: ?breakdance)[(replace: ?passage2)[You bust out some moves with the NPC.]] }
Comments
Your issue is a result of a slight misunderstanding of where the resulting link created using a named hook with a (click:) macro is generated.
The code representing the resulting link is generated where the named hook is, not where the (click:) macro is, this also means that the output of the related (replace:) is also generated where the named hook is and you can see this using your web-browser's Development tools to see what happens when you click on the links.
This is why replacing the passage2 area does not effect the dance options text, because that text is actually part of the passage 1 area. The passage2 area being replaced actually contains the residual elements representing where the (click:) macros were.
To make your code work the way you want you would need to move the passage2 named hook into the (replace:) macro's associated hook, the middle section of your example would look something like the following:
WARNING:
The current Twine 2 Story Formats are not designed to support the type of single page/passage methodology you are trying to create. Their History/State modules are designed to only persist the variable changes done within the current passage when the Reader navigates to another passage, up until that point the changes are only local to the current passage (and to child passages / code referenced from it).
eg. Your (set: $mood to "romantic") is only persisted to History/State when the Reader moves to another passage.
If there current passage is refresh in the wrong way (eg via web-browser page refresh) then all the Reader's progress through the current passage can be lost.
There is only one Story Format that I know of that is designed to work correctly in singe page mode and that is Twine 1's Jonah.