                        if (nextCell) selectCell(nextCell.dataset.cellId);
                        break;
                }
            }
            
            // Show shortcuts modal
            if (e.key === '?' && e.shiftKey) {
                const modal = document.getElementById('shortcuts-modal');
                modal.style.display = modal.style.display === 'block' ? 'none' : 'block';
            }
        });
        
        // Cell click to select
        document.addEventListener('click', (e) 