import { useMemo } from 'react'; import { useWindowDimensions } from 'react-native'; /** Design baseline width; keep in sync with shared layout (e.g. Card). */ const BASE_WIDTH = 430; export function useResponsiveScale() { const { width } = useWindowDimensions(); return useMemo(() => { const scale = Math.min(Math.max(width / BASE_WIDTH, 0.9), 1.15); const rs = (value: number) => Math.round(value * scale); return { width, scale, rs }; }, [width]); }