Concept: Find the minimal axis-aligned rectangle that contains all non-zero cells and output only that sub-grid (no scaling or mirroring). Works for any grid size.