ui/ UI layer
12 React components. Every component calls usePlanner() to read state — there is no prop drilling anywhere in the app. All styling is inline JSX using var(--token) CSS variables. No CSS modules, no Tailwind.
const {...} = usePlanner() for statestyle={{}} with var(--token) CSS variablesChildren
Component hierarchy
Shared conventions
usePlanner() — the universal hook
Every component starts with a destructuring of usePlanner(). It's a wide import — components pull in exactly what they need. There's never any prop passing for shared state.
Inline styles with CSS variables
// Typical component style pattern
<div style={{
background: 'var(--bg-surface)',
border: `1px solid ${isActive ? 'var(--active)' : 'var(--border-2)'}`,
color: 'var(--text-1)',
fontSize: isPhone ? 9 : 11,
}}>
isPhone / isMobile responsive flags
Components read isPhone (viewport <600px) and isMobile (<1024px) from context to render different layouts. These flags are computed in PlannerContext from a ResizeObserver.
Drag-drop pattern
Every draggable element calls onDragStart → sets dragInfo in context. Every drop target calls the appropriate context handler (onDrop, onDropBank, etc.). Touch events are handled separately with a ghost element system.