const KEY='forge-academy-state-v1';
export function getState(){
  try{return JSON.parse(localStorage.getItem(KEY))||{};}catch{return {};}
}
export function saveState(state){
  try{localStorage.setItem(KEY,JSON.stringify(state));}catch(error){console.warn('Storage unavailable',error);}
}
