902560cd68
Smoke-test report: the user could only initiate a drag from the bottom strip of a tableau card, not its visible face. Root cause was a fan- step mismatch between rendering and hit-testing. card_plugin::card_positions steps face-down cards by TABLEAU_FACEDOWN_FAN_FRAC (0.12) and face-up cards by TABLEAU_FAN_FRAC (0.25), so a column with 6 face-down + 1 face-up at the bottom renders the face-up card at base.y - 0.72 * card_h. input_plugin's card_position used a uniform 0.25 step for every position, computing the same card's hit-test centre as base.y - 1.5 * card_h — almost a full card height below the visible sprite. The hit-test AABB and the sprite AABB overlapped only over the bottom 0.61 * card_h, which matches the user's observation that only the bottom of the card responds to clicks. card_position now mirrors card_plugin's exact logic: walk the pile's preceding cards and step by TABLEAU_FACEDOWN_FAN_FRAC for face-down, TABLEAU_FAN_FRAC for face-up. TABLEAU_FACEDOWN_FAN_FRAC is now public for the same reason TABLEAU_FAN_FRAC already was — the renderer and the hit-tester have to agree by construction or this regression returns. Updates the existing find_draggable_skips_face_down_cards test that relied on the old uniform-fan geometry, and adds find_draggable_hits_face_up_card_with_face_down_cards_above_it as a regression test that fails without this fix. The during-drag rendering and pile_drop_rect still use the uniform TABLEAU_FAN_FRAC because the cards being dragged are guaranteed face-up, and a slightly oversized drop target reads as forgiving rather than wrong. Those call sites are intentionally untouched. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>