## ADDED Requirements ### Requirement: Layout presets The viewport container SHALL support switching between four layout presets at any time: Single (1 tile), HSplit (2 tiles side-by-side), VSplit (2 tiles top-bottom), and Quad (4 tiles in a 2×2 grid). #### Scenario: Switch layout from Single to HSplit - **WHEN** the user selects "Horizontal Split" from the layout menu - **THEN** the viewport splits into two equal-sized tiles side-by-side #### Scenario: Switch layout from HSplit to Single - **WHEN** the user selects "Single" from the layout menu - **THEN** the two tiles merge back into a single tile, and the focused tile's camera/settings are preserved #### Scenario: Switch from HSplit to Quad - **WHEN** the user switches from HSplit to Quad - **THEN** four tiles are created in a 2×2 grid, filling the viewport area ### Requirement: Draggable dividers The divider line between tiles SHALL be draggable to resize adjacent tiles. Dividers SHALL be 6px wide with visual hover feedback. #### Scenario: Drag horizontal divider - **WHEN** the user clicks and drags the divider between two tiles - **THEN** the divider follows the mouse, and tiles resize proportionally #### Scenario: Drag divider to edge - **WHEN** the user drags a divider to within 10% of the viewport edge - **THEN** the divider snaps back to the 10% boundary to prevent tiles from becoming too small (minimum 100px per dimension) ### Requirement: Layout applies to the entire viewport area When the layout changes, all tiles SHALL be redistributed to fill the entire available viewport panel content region. No gaps between tiles. #### Scenario: Resize main window with Quad layout - **WHEN** the user resizes the main application window - **THEN** all four tiles resize proportionally to maintain their relative sizes and fill the viewport content area ### Requirement: Space-key maximize restores previous layout When maximized, pressing Space again SHALL restore the exact layout and divider positions from before maximization. #### Scenario: Maximize and restore preserves layout - **WHEN** the user has an HSplit layout with divider at 0.3, then hovers tile B and presses Space, then presses Space again - **THEN** the viewport returns to HSplit layout with both tiles visible and the divider at 0.3 ### Requirement: Escape restores maximized viewport When maximized, pressing Escape SHALL restore the previous layout (same behavior as Space toggle). #### Scenario: Escape during maximize - **WHEN** the viewport is maximized and the user presses Escape - **THEN** the previous multi-tile layout is restored ### Requirement: Space requires tile hover in multi-tile layouts In Single layout (only 1 tile), Space SHALL be a no-op — there is nothing to maximize. #### Scenario: Space ignored in Single layout - **WHEN** the viewport is already in Single layout and the user presses Space - **THEN** the viewport remains unchanged in Single layout