Beat the softened butter, both sugars, and salt in a large bowl with an electric mixer on medium-high for about 3 minutes. Look for a pale, creamy mixture with a noticeably lighter texture.
Mix in the whole egg, extra yolk, and vanilla just until blended, then incorporate the baking powder followed by the flour, scraping the bowl’s sides and bottom as you work. Stop when no dry flour remains and the dough looks soft and thick.
Press the dough into a round approximately ½ inch thick, enclose it in plastic wrap, and refrigerate for at least 2 hours or up to overnight. The chilled round should feel firm enough to roll without smearing or sticking excessively.
Set the oven to 350°F, position racks in its upper and lower thirds, and cover 2 large rimmed baking sheets with parchment paper. The parchment should cover the areas beneath every cookie and candy window.
Leave half the dough wrapped in the refrigerator while rolling the other half on a lightly floured surface to ¼-inch thickness. An even sheet of dough gives the frames consistent strength and helps them bake uniformly.
Stamp out the outer shapes, lift them onto the prepared sheets with a thin spatula, leave 1 inch between them, and only then cut their windows with a smaller cutter. If the dough becomes floppy or difficult to handle, return it to the refrigerator for a few minutes before continuing.
Press the first scraps into a ½-inch-thick round, wrap and chill it while shaping the second dough half, then combine all remaining scraps for one final rolling and cutting, chilling briefly if needed and discarding the last scraps. The dough should stay firm enough that the cut edges remain distinct rather than stretching.
Distribute the crushed candy among the windows without heaping it above the dough, then bake for 12 to 14 minutes, turning the sheets and exchanging their rack positions halfway through. The cookies are ready when their edges turn light golden and the candy has melted across the openings.
Carefully ease a wooden skewer through any large bubbles immediately after removing the sheets, keeping bare fingers away from the molten sugar. A gentle motion helps the bubbles settle without dragging candy over the frames.
Set the baking sheets on wire racks and leave the cookies on their parchment until completely cool. The centers must become firm panes before you lift the cookies, or they can stretch, tear, or crack.