···51 if (fromMobile) {
52 // Mobile → Desktop: reflow items to use the full grid width.
53 // Sort by mobile position so items are placed in reading order.
54- const sorted = items.toSorted(
55- (a, b) => a.mobileY - b.mobileY || a.mobileX - b.mobileX
56- );
5758 // Place each item into the first available spot on the desktop grid
59 const placed: Item[] = [];
···66 } else {
67 // Desktop → Mobile: proportional positions
68 for (const item of items) {
69- item.mobileX = clamp(
70- Math.floor((item.x * 2) / 2) * 2,
71- 0,
72- COLUMNS - item.mobileW
73- );
74 item.mobileY = Math.max(0, Math.round(item.y * 2));
75 }
76 fixAllCollisions(items, true);
···51 if (fromMobile) {
52 // Mobile → Desktop: reflow items to use the full grid width.
53 // Sort by mobile position so items are placed in reading order.
54+ const sorted = items.toSorted((a, b) => a.mobileY - b.mobileY || a.mobileX - b.mobileX);
005556 // Place each item into the first available spot on the desktop grid
57 const placed: Item[] = [];
···64 } else {
65 // Desktop → Mobile: proportional positions
66 for (const item of items) {
67+ item.mobileX = clamp(Math.floor((item.x * 2) / 2) * 2, 0, COLUMNS - item.mobileW);
000068 item.mobileY = Math.max(0, Math.round(item.y * 2));
69 }
70 fixAllCollisions(items, true);