# v95.18 – Deep bug analysis and fixes

## Static findings
- Inline `onclick` handlers all point to existing functions.
- No duplicate HTML ids.
- No duplicate function declarations.
- JS/PHP syntax checks pass.
- CSS braces/comments balanced.
- Invalid `:contains()` selector is not present.
- Several `getElementById` ids are dynamic and expected: `videoFrame`, `restBig`, `restProgressBar`, `newProfileBox`, `newProfileName`.

## Bugs fixed
1. **Bottom next/rest button row could use stale layout state**
   - `syncPassControlsRow()` was only called on rest and not reliably on every render path.
   - Fixed by syncing inside `renderControls()` and hardening previous-button hide state.

2. **Pass menu styling partially targeted old/generic selectors**
   - Actual menu is `#settingsMenu.top-tools`.
   - Added final real-target CSS for this element and its buttons.

3. **Fullscreen could silently do nothing**
   - Added pseudo-fullscreen fallback class when document fullscreen is unavailable or fails.

4. **Playlist visibility protected**
   - Reasserted playlist show/hide rules after all older layers.

## Remaining watch items for manual mobile test
- Real YouTube autoplay/sound behavior still depends on iOS/Safari user-gesture rules.
- Fullscreen on iOS can only be pseudo-fullscreen for the page.
