// SVG icon set — minimal line style
const Icon = ({ d, viewBox = '0 0 24 24', stroke = 'currentColor', fill = 'none', sw = 1.6, className = 'ico', children, ...rest }) => (
  <svg className={className} viewBox={viewBox} fill={fill} stroke={stroke} strokeWidth={sw} strokeLinecap="round" strokeLinejoin="round" {...rest}>
    {d ? <path d={d} /> : children}
  </svg>
);

const I = {
  shield: (p) => <Icon {...p}><path d="M12 3l8 3v6c0 5-3.5 8-8 9-4.5-1-8-4-8-9V6l8-3z"/></Icon>,
  sword: (p) => <Icon {...p}><path d="M14.5 17.5L20 12l-2-2-5.5 5.5"/><path d="M14 18l2 2 4-4-2-2"/><path d="M11 13l-7 7 0 1 1 0 7-7"/><path d="M8 14l2 2"/></Icon>,
  scroll: (p) => <Icon {...p}><path d="M5 4h11a3 3 0 013 3v10a3 3 0 01-3 3H8a3 3 0 01-3-3V4z"/><path d="M19 7H8M8 4v13"/><path d="M5 4v13a3 3 0 003 3"/></Icon>,
  trophy: (p) => <Icon {...p}><path d="M8 4h8v5a4 4 0 11-8 0V4z"/><path d="M5 6H3a3 3 0 003 3M19 6h2a3 3 0 01-3 3"/><path d="M9 16h6M10 14v2M14 14v2M9 20h6"/></Icon>,
  crown: (p) => <Icon {...p}><path d="M3 8l4 4 5-7 5 7 4-4-2 11H5z"/><path d="M5 19h14"/></Icon>,
  flame: (p) => <Icon {...p}><path d="M12 3s5 4 5 9a5 5 0 11-10 0c0-3 2-4 2-7 0 0 3 1 3 4z"/></Icon>,
  star: (p) => <Icon {...p}><path d="M12 3l2.6 5.6L20 9.4l-4 4 1 6-5-2.7L7 19.4l1-6-4-4 5.4-.8z"/></Icon>,
  bolt: (p) => <Icon {...p}><path d="M13 3L4 14h6l-1 7 9-11h-6z"/></Icon>,
  check: (p) => <Icon {...p} sw="2.5"><path d="M5 12.5l4 4 10-10"/></Icon>,
  plus: (p) => <Icon {...p}><path d="M12 5v14M5 12h14"/></Icon>,
  more: (p) => <Icon {...p}><circle cx="5" cy="12" r="1"/><circle cx="12" cy="12" r="1"/><circle cx="19" cy="12" r="1"/></Icon>,
  log: (p) => <Icon {...p}><path d="M5 5h11l3 3v11a2 2 0 01-2 2H5a2 2 0 01-2-2V7a2 2 0 012-2z"/><path d="M14 5v4h5M7 13h10M7 17h7"/></Icon>,
  user: (p) => <Icon {...p}><circle cx="12" cy="8" r="4"/><path d="M4 21c0-4.4 3.6-8 8-8s8 3.6 8 8"/></Icon>,
  cog: (p) => <Icon {...p}><circle cx="12" cy="12" r="3"/><path d="M19.4 15a1.6 1.6 0 00.3 1.8l.1.1a2 2 0 11-2.8 2.8l-.1-.1a1.6 1.6 0 00-1.8-.3 1.6 1.6 0 00-1 1.5V21a2 2 0 11-4 0v-.1a1.6 1.6 0 00-1-1.5 1.6 1.6 0 00-1.8.3l-.1.1a2 2 0 11-2.8-2.8l.1-.1a1.6 1.6 0 00.3-1.8 1.6 1.6 0 00-1.5-1H3a2 2 0 110-4h.1a1.6 1.6 0 001.5-1 1.6 1.6 0 00-.3-1.8l-.1-.1a2 2 0 112.8-2.8l.1.1a1.6 1.6 0 001.8.3 1.6 1.6 0 001-1.5V3a2 2 0 114 0v.1a1.6 1.6 0 001 1.5 1.6 1.6 0 001.8-.3l.1-.1a2 2 0 112.8 2.8l-.1.1a1.6 1.6 0 00-.3 1.8 1.6 1.6 0 001.5 1H21a2 2 0 110 4h-.1a1.6 1.6 0 00-1.5 1z"/></Icon>,
  logout: (p) => <Icon {...p}><path d="M9 21H5a2 2 0 01-2-2V5a2 2 0 012-2h4M16 17l5-5-5-5M21 12H9"/></Icon>,
  sound: (p) => <Icon {...p}><path d="M3 10v4h4l5 4V6L7 10H3z"/><path d="M16 8a5 5 0 010 8M19 5a9 9 0 010 14"/></Icon>,
  search: (p) => <Icon {...p}><circle cx="11" cy="11" r="7"/><path d="M21 21l-4.3-4.3"/></Icon>,
  chevR: (p) => <Icon {...p}><path d="M9 6l6 6-6 6"/></Icon>,
  chevD: (p) => <Icon {...p}><path d="M6 9l6 6 6-6"/></Icon>,
  x: (p) => <Icon {...p}><path d="M6 6l12 12M18 6L6 18"/></Icon>,
  filter: (p) => <Icon {...p}><path d="M3 5h18l-7 9v6l-4-2v-4z"/></Icon>,
  // categories
  brain: (p) => <Icon {...p}><path d="M9 4a3 3 0 00-3 3v1a3 3 0 00-2 3 3 3 0 002 3v1a3 3 0 003 3h1V4H9zM15 4a3 3 0 013 3v1a3 3 0 012 3 3 3 0 01-2 3v1a3 3 0 01-3 3h-1V4h1z"/></Icon>,
  briefcase: (p) => <Icon {...p}><rect x="3" y="7" width="18" height="13" rx="2"/><path d="M9 7V5a2 2 0 012-2h2a2 2 0 012 2v2M3 13h18"/></Icon>,
  heart: (p) => <Icon {...p}><path d="M12 20s-7-4.5-7-10a4 4 0 017-2.6A4 4 0 0119 10c0 5.5-7 10-7 10z"/></Icon>,
  book: (p) => <Icon {...p}><path d="M4 4h7a3 3 0 013 3v13a2 2 0 00-2-2H4V4zM20 4h-7a3 3 0 00-3 3v13a2 2 0 012-2h8V4z"/></Icon>,
  spark: (p) => <Icon {...p}><path d="M12 3v4M12 17v4M3 12h4M17 12h4M5.6 5.6l2.8 2.8M15.6 15.6l2.8 2.8M5.6 18.4l2.8-2.8M15.6 8.4l2.8-2.8"/></Icon>,
  // attributes
  fist: (p) => <Icon {...p}><path d="M6 11V8a2 2 0 014 0v3M10 8V6a2 2 0 014 0v5M14 7a2 2 0 014 0v6a6 6 0 01-12 0v-2"/></Icon>,
  eye: (p) => <Icon {...p}><path d="M2 12s4-7 10-7 10 7 10 7-4 7-10 7S2 12 2 12z"/><circle cx="12" cy="12" r="3"/></Icon>,
  feather: (p) => <Icon {...p}><path d="M21 4c-7 0-13 6-13 13l3 3 4-2 5-5 1-9z"/><path d="M16 8L8 16M8 20l-4-4"/></Icon>,
  compass: (p) => <Icon {...p}><circle cx="12" cy="12" r="9"/><path d="M16 8l-2 6-6 2 2-6z"/></Icon>,
  calendar: (p) => <Icon {...p}><rect x="3" y="5" width="18" height="16" rx="2"/><path d="M3 10h18M8 3v4M16 3v4"/></Icon>,
  trend: (p) => <Icon {...p}><path d="M3 17l6-6 4 4 8-8M14 7h7v7"/></Icon>,
  users: (p) => <Icon {...p}><circle cx="9" cy="8" r="3"/><path d="M3 20a6 6 0 0112 0M16 4a3 3 0 010 6M21 20a6 6 0 00-3-5.2"/></Icon>,
};

window.Icon = Icon;
window.I = I;
