Revise the supplied offline 8×8 pixel editor: add a visible one-step Undo button with id="undo". It restores the state immediately before the most recent pixel-changing pencil click or bucket fill. An entire fill is one edit. After Undo there is no older edit to undo. Selecting tools or colors, downloading, or filling with the same color must not discard the last real edit. Reset restores the original icon and clears undo history.

Preserve the first ticket: Bucket recolors only matching cells connected horizontally or vertically to the click, never through diagonal contact alone. Preserve the appearance, robot, palette, Pencil, Reset and actual 8×8 opaque PNG download. Preserve the DOM contract: #board is the visible editable 8×8 canvas; #pencil, #bucket, #reset and #download are buttons; #palette contains buttons with the original data-color hex values. Keep the canvas mapping and colors unchanged. For example, fill the left white eye cyan, pencil one magenta antenna pixel, then Undo: the antenna pixel returns to its prior color but the eye stays cyan, including in the downloaded file.

Do not use tools. Return the entire standalone HTML document, including all CSS and JavaScript, with no Markdown fences, commentary or external dependencies. The source to revise follows.
