# Responsive / Mobile-First — Surgical Fixes **Date**: 2026-05-23 **Approach**: A — surgical fixes, no layout redesign **Target**: phone-first (375px+), tablet perfect (768px+) **Baseline score**: 40/100 responsive readiness **Target score**: 80+/100 --- ## Scope Pure CSS/className changes. Zero store, schema, or PDF impact. ~12-15 files. --- ## 1. Dialog viewport clamping **File**: `src/components/ui/Dialog.tsx` - All size variants get `max-w-[calc(100vw-2rem)]` so dialogs never exceed viewport - Backdrop padding: `p-4` → `p-2 sm:p-4` - Dialog content padding responsive where needed ## 2. SVG Editor sidebar — stack on mobile **File**: `src/styles/svg-editor.css` - Below `md` (768px): sidebar stacks below canvas via `flex-direction: column` - Sidebar width: `380px` → `w-full` on mobile, `380px` on `md+` - Canvas gets min-height to stay usable when stacked ## 3. AnatomyCanvas — height constraint + touch **Files**: `src/components/canvas/AnatomyCanvas.tsx`, `src/app/routes/EditorRoute.tsx` - Mobile: `max-h-[60vh]` on canvas wrapper so observations panel stays visible - `overflow-hidden` on wrapper - CSS `touch-action: pan-x pan-y` for native scroll compatibility ## 4. Touch targets — minimum 40px **Files**: `src/components/ui/Button.tsx`, `src/components/observation/VertebraPicker.tsx`, `src/components/ui/Chip.tsx` - Button `sm` size: `h-8` → `h-9 sm:h-8` (36px mobile, 32px desktop) — compromise between touch and density - VertebraPicker region tabs: add `min-h-[2.75rem]` (44px) - Any interactive Chip: ensure `min-h-[2.5rem]` ## 5. Responsive typography **Files**: all route components, `ObservationList.tsx`, `ConclusionPanel.tsx` Pattern: - Page headings: `text-xl sm:text-2xl md:text-3xl` - Section headings: `text-lg sm:text-xl` - Form legends: `text-lg sm:text-xl` ## 6. Padding normalization **Files**: all route components - Route containers: `px-4 sm:px-6` - Gaps: `gap-4 sm:gap-6` - Consistent tightening on phone ## 7. Editor layout mobile polish **File**: `src/app/routes/EditorRoute.tsx` - Single-column below `lg`: SVG canvas explicit height cap - Observations section scrollable independently - Sticky observation header on mobile for context ## 8. Footer + Header **Files**: `src/components/brand/Footer.tsx`, `src/components/brand/AppHeader.tsx` - Footer: `gap-2 sm:gap-4` - Header: already responsive (tagline hidden