Place the step card beside the spotlit target: try preferred, then the
remaining sides (right → bottom → top → left); the first side where the card
fully fits in the viewport wins. When no side fits (tiny viewport), fall
back to bottom, clamped into view on both axes.
Place the step card beside the spotlit target: try
preferred, then the remaining sides (right → bottom → top → left); the first side where the card fully fits in the viewport wins. When no side fits (tiny viewport), fall back tobottom, clamped into view on both axes.