// Rich Flat illustrated icons for HelperMatch
// Style: multi-color flat fill, 64x64 viewBox, sticker-like, no stroke outline.
// Each icon is a small scene with face/accessory details where appropriate.
//
// Naming matches data.js taxonomy ids so <FlatIcon name={id}/> just works.
// Categories: main / cooking / other / personality / language / cat (group headers)

// --- color palette tokens -------------------------------------------------
const C = {
  coral: '#E8856A', coralDark: '#C0634B', coralDeep: '#8E3F25',
  coralBg: '#FFE8DE', coralBg2: '#FBD9C3',
  mint: '#48B8A0', mintDark: '#2E8B74',
  mintBg: '#D7F0E9',
  trust: 'oklch(0.46 0.12 275)', trustLight: 'oklch(0.56 0.12 275)',
  trustBg: '#E5E0F0',
  gold: '#D4A554', goldLight: '#FFE2A8', goldBg: '#FFF3CD',
  bronze: '#B8865B', bronzeDark: '#8B6543', bronzeDarker: '#5C4530',
  skin: '#FFE2C5', skinShade: '#F5C09E', skinPink: '#FFD4C0',
  ink: '#3D2B1F', white: '#FFFFFF', cream: '#FFF3ED',
  blush: '#F5A88E',
};

// Per-category disc background tokens.
// Goal: every chip in a section reads as one family at a glance.
const CAT_BG = {
  main:        C.coralBg,    // main skills — warm coral
  cooking:     C.coralBg2,   // cooking cuisines — deeper coral
  other:       C.trustBg,    // other skills — trust violet
  personality: C.goldBg,     // personality — soft gold
  position:    C.mintBg,     // job positions — mint
  family:      C.coralBg,    // family roles / household — coral
  market:      C.trustBg,    // location markets — trust
  status:      C.goldBg,     // contract / availability — gold
  schedule:    C.mintBg,     // day-off / accommodation — mint
  jobtype:     C.coralBg,    // job type — coral
  gender:      C.trustBg,    // gender — trust
  cat:         C.cream,      // category headers — neutral cream
};

// Map every icon id to a {cat, draw} pair. `cat` keys into CAT_BG above.
const FLAT_ICONS = {

  // ============== MAIN SKILLS ==============
  baby: {
    cat: 'main',
    draw: () => (<>
      <path d="M16 28 a16 16 0 0 1 32 0 v4 H16z" fill={C.coral}/>
      <path d="M14 30 h4 v4 a3 3 0 0 1 -3 -3 z" fill={C.coralDark}/>
      <path d="M46 30 h4 v1 a3 3 0 0 1 -4 3z" fill={C.coralDark}/>
      <circle cx="32" cy="36" r="14" fill={C.skinPink}/>
      <ellipse cx="22" cy="40" rx="2.4" ry="1.6" fill={C.blush} opacity=".75"/>
      <ellipse cx="42" cy="40" rx="2.4" ry="1.6" fill={C.blush} opacity=".75"/>
      <ellipse cx="26" cy="35" rx="1.4" ry="2" fill={C.ink}/>
      <ellipse cx="38" cy="35" rx="1.4" ry="2" fill={C.ink}/>
      <ellipse cx="26.4" cy="34.2" rx=".5" ry=".7" fill={C.white}/>
      <ellipse cx="38.4" cy="34.2" rx=".5" ry=".7" fill={C.white}/>
      <path d="M28 41 Q32 44 36 41" stroke={C.coralDark} strokeWidth="1.6" fill="none" strokeLinecap="round"/>
      <circle cx="32" cy="46" r="1.6" fill={C.coral}/>
      <path d="M19 28 q-3 -3 -3 -7" stroke={C.coralDark} strokeWidth="2" fill="none" strokeLinecap="round"/>
    </>),
  },

  child: {
    cat: 'main',
    draw: () => (<>
      {/* shirt body first */}
      <path d="M10 58 q2 -20 22 -20 q20 0 22 20 z" fill={C.mint}/>
      <rect x="22" y="40" width="20" height="3" fill={C.mintDark} opacity=".5"/>
      {/* neck bridge */}
      <rect x="28" y="28" width="8" height="6" fill={C.skin}/>
      {/* head */}
      <circle cx="32" cy="22" r="9" fill={C.skin}/>
      <path d="M24 20 q2 -8 8 -8 q8 0 10 8 q-3 -3 -10 -3 q-5 0 -8 3z" fill={C.bronzeDark}/>
      <circle cx="28" cy="22" r="1.2" fill={C.ink}/>
      <circle cx="36" cy="22" r="1.2" fill={C.ink}/>
      <path d="M30 26 q2 2 4 0" stroke={C.coralDark} strokeWidth="1.4" fill="none" strokeLinecap="round"/>
      {/* balloon */}
      <circle cx="54" cy="14" r="5" fill={C.coral}/>
      <path d="M54 19 q-1 8 -2 14" stroke={C.coralDark} strokeWidth="1" fill="none"/>
      <ellipse cx="52" cy="12" rx="1.2" ry=".8" fill={C.white} opacity=".6"/>
    </>),
  },

  teen: {
    cat: 'main',
    draw: () => (<>
      {/* shirt body first */}
      <path d="M8 58 q4 -18 24 -18 q20 0 24 18 z" fill={C.coral}/>
      {/* neck */}
      <rect x="28" y="32" width="8" height="8" fill={C.skin}/>
      {/* head */}
      <circle cx="32" cy="26" r="11" fill={C.skin}/>
      <path d="M20 22 q0 -14 12 -14 q12 0 12 14 q-2 -3 -6 -4 q-2 -3 -6 -3 q-4 0 -6 3 q-4 1 -6 4z" fill={C.ink}/>
      <circle cx="28" cy="26" r="1.4" fill={C.ink}/>
      <circle cx="36" cy="26" r="1.4" fill={C.ink}/>
      <path d="M30 31 q2 1 4 0" stroke={C.coralDark} strokeWidth="1.4" fill="none" strokeLinecap="round"/>
      {/* headphones */}
      <path d="M18 26 q0 -10 14 -10 q14 0 14 10" stroke={C.trust} strokeWidth="2.5" fill="none" strokeLinecap="round"/>
      <rect x="15" y="24" width="5" height="8" rx="2" fill={C.trust}/>
      <rect x="44" y="24" width="5" height="8" rx="2" fill={C.trust}/>
    </>),
  },

  elderly: {
    cat: 'main',
    draw: () => (<>
      <path d="M16 26 a16 16 0 0 1 32 0 q-2 -2 -8 -2 q-3 -2 -8 -2 q-5 0 -8 2 q-6 0 -8 2z" fill="#E0E0E0"/>
      <ellipse cx="32" cy="32" rx="14" ry="14" fill={C.skin}/>
      <circle cx="25" cy="32" r="4" fill="none" stroke={C.ink} strokeWidth="1.6"/>
      <circle cx="39" cy="32" r="4" fill="none" stroke={C.ink} strokeWidth="1.6"/>
      <path d="M29 32 h6" stroke={C.ink} strokeWidth="1.6"/>
      <path d="M27 40 Q32 44 37 40" stroke={C.coralDark} strokeWidth="1.6" strokeLinecap="round" fill="none"/>
      <path d="M14 56 q4 -8 18 -8 q14 0 18 8 z" fill={C.mint}/>
      <path d="M48 14 c -2 -3 -6 -1 -6 2 c 0 3 6 7 6 7 c 0 0 6 -4 6 -7 c 0 -3 -4 -5 -6 -2z" fill={C.coral}/>
    </>),
  },

  pet: {
    cat: 'main',
    draw: () => (<>
      <path d="M16 22 q-2 -10 6 -12 q4 6 4 14 z" fill={C.bronze}/>
      <path d="M48 22 q2 -10 -6 -12 q-4 6 -4 14 z" fill={C.bronze}/>
      <path d="M19 16 q1 -4 4 -5" stroke={C.bronzeDark} strokeWidth="1.5" fill="none" strokeLinecap="round"/>
      <ellipse cx="32" cy="34" rx="16" ry="14" fill={C.gold}/>
      <ellipse cx="32" cy="40" rx="9" ry="7" fill={C.goldLight}/>
      <ellipse cx="32" cy="36" rx="2.4" ry="1.8" fill={C.ink}/>
      <path d="M32 38 v3" stroke={C.ink} strokeWidth="1.4" strokeLinecap="round"/>
      <path d="M32 41 q-3 3 -5 1" stroke={C.ink} strokeWidth="1.4" strokeLinecap="round" fill="none"/>
      <path d="M32 41 q3 3 5 1" stroke={C.ink} strokeWidth="1.4" strokeLinecap="round" fill="none"/>
      <path d="M30 42 q2 3 4 0 v3 q-2 1 -4 0z" fill={C.coral}/>
      <circle cx="25" cy="30" r="1.8" fill={C.ink}/>
      <circle cx="39" cy="30" r="1.8" fill={C.ink}/>
      <circle cx="25.5" cy="29.4" r=".6" fill={C.white}/>
      <circle cx="39.5" cy="29.4" r=".6" fill={C.white}/>
      <path d="M19 46 q13 6 26 0" stroke={C.mint} strokeWidth="3" fill="none" strokeLinecap="round"/>
      <circle cx="32" cy="49" r="2" fill={C.gold}/>
    </>),
  },

  tutoring: {
    cat: 'main',
    draw: () => (<>
      {/* book base */}
      <path d="M8 18 h22 v34 h-22z" fill={C.coral}/>
      <path d="M34 18 h22 v34 h-22z" fill={C.trust}/>
      <rect x="30" y="18" width="4" height="34" fill={C.coralDeep}/>
      {/* page lines */}
      <path d="M12 26 h14 M12 30 h14 M12 34 h10" stroke={C.white} strokeWidth="1.4" strokeLinecap="round" opacity=".9"/>
      <path d="M38 26 h14 M38 30 h14 M38 34 h10" stroke={C.white} strokeWidth="1.4" strokeLinecap="round" opacity=".9"/>
      {/* pencil */}
      <path d="M44 8 l8 8 l-22 22 l-8 -8z" fill={C.gold}/>
      <path d="M44 8 l8 8 l-3 3 l-8 -8z" fill={C.coral}/>
      <path d="M22 30 l-2 8 l8 -2z" fill={C.white}/>
      <path d="M22 30 l-2 8 l3 -1z" fill={C.ink}/>
      {/* sparkle */}
      <circle cx="56" cy="14" r="1.6" fill={C.gold}/>
    </>),
  },

  housekeeping: {
    cat: 'main',
    draw: () => (<>
      {/* roof */}
      <path d="M8 32 L32 12 L56 32 L52 32 L52 52 H12 V32 z" fill={C.coral}/>
      <path d="M8 32 L32 12 L56 32 L51 32 L32 17 L13 32z" fill={C.coralDark}/>
      {/* body */}
      <rect x="14" y="32" width="36" height="22" fill={C.cream}/>
      {/* door */}
      <path d="M26 38 h12 v16 h-12z" fill={C.bronze}/>
      <circle cx="35" cy="46" r=".8" fill={C.gold}/>
      {/* window */}
      <rect x="17" y="36" width="6" height="6" fill={C.mint}/>
      <path d="M20 36 v6 M17 39 h6" stroke={C.cream} strokeWidth=".8"/>
      <rect x="41" y="36" width="6" height="6" fill={C.mint}/>
      <path d="M44 36 v6 M41 39 h6" stroke={C.cream} strokeWidth=".8"/>
      {/* chimney */}
      <rect x="44" y="14" width="5" height="8" fill={C.coralDeep}/>
      <path d="M44 16 q-2 -4 0 -6 q2 4 0 6z" fill={C.white} opacity=".7"/>
    </>),
  },

  cooking: {
    cat: 'main',
    draw: () => (<>
      <path d="M22 14 q-3 4 0 8 q3 -4 0 -8z" fill={C.white} opacity=".75"/>
      <path d="M32 10 q-3 5 0 10 q3 -5 0 -10z" fill={C.white} opacity=".85"/>
      <path d="M42 14 q-3 4 0 8 q3 -4 0 -8z" fill={C.white} opacity=".75"/>
      <path d="M10 30 h44 v18 a6 6 0 0 1 -6 6 H16 a6 6 0 0 1 -6 -6 z" fill={C.coralDark}/>
      <rect x="10" y="30" width="44" height="4" fill={C.coralDeep}/>
      <path d="M16 38 v8" stroke={C.coral} strokeWidth="2" strokeLinecap="round" opacity=".7"/>
      <rect x="4" y="34" width="8" height="4" rx="2" fill={C.coralDeep}/>
      <rect x="52" y="34" width="8" height="4" rx="2" fill={C.coralDeep}/>
      <rect x="14" y="26" width="36" height="5" rx="2" fill={C.gold}/>
      <circle cx="32" cy="24" r="3" fill={C.bronze}/>
      <path d="M28 36 l-4 8 q3 1 5 0z" fill={C.coral}/>
      <path d="M27 35 l-1 -3 m2 3 l1 -3" stroke={C.mint} strokeWidth="1.4" strokeLinecap="round"/>
    </>),
  },

  driving: {
    cat: 'main',
    draw: () => (<>
      <path d="M8 38 q4 -10 12 -12 h24 q8 2 12 12 v8 h-48z" fill={C.mint}/>
      <path d="M14 36 q3 -8 8 -8 h20 q5 0 8 8 z" fill={C.white} opacity=".95"/>
      <rect x="32" y="28" width="1.5" height="8" fill={C.mint}/>
      <circle cx="20" cy="46" r="6" fill={C.ink}/>
      <circle cx="20" cy="46" r="2.5" fill="#9A8B7F"/>
      <circle cx="44" cy="46" r="6" fill={C.ink}/>
      <circle cx="44" cy="46" r="2.5" fill="#9A8B7F"/>
      <circle cx="52" cy="40" r="2" fill={C.goldBg}/>
      <circle cx="12" cy="40" r="1.5" fill={C.coral}/>
      <rect x="22" y="38" width="3" height="1.4" rx=".5" fill={C.ink}/>
      <rect x="40" y="38" width="3" height="1.4" rx=".5" fill={C.ink}/>
    </>),
  },

  marketing: {
    cat: 'main',
    draw: () => (<>
      {/* megaphone */}
      <path d="M10 26 L40 14 v36 L10 38 z" fill={C.coral}/>
      <path d="M40 14 l8 -2 v40 l-8 -2z" fill={C.coralDark}/>
      <rect x="6" y="26" width="6" height="12" fill={C.coralDeep}/>
      {/* sound waves */}
      <path d="M52 22 q4 4 4 10 q0 6 -4 10" stroke={C.gold} strokeWidth="2.4" fill="none" strokeLinecap="round"/>
      <path d="M48 28 q2 2 2 4 q0 2 -2 4" stroke={C.gold} strokeWidth="2" fill="none" strokeLinecap="round"/>
      {/* sparkles */}
      <circle cx="26" cy="20" r="1.4" fill={C.white} opacity=".8"/>
      <circle cx="22" cy="44" r="1.2" fill={C.white} opacity=".7"/>
    </>),
  },

  groceries: {
    cat: 'main',
    draw: () => (<>
      {/* bag */}
      <path d="M14 22 h36 l-3 30 a3 3 0 0 1 -3 3 H20 a3 3 0 0 1 -3 -3z" fill={C.bronze}/>
      <path d="M14 22 h36 v3 H14z" fill={C.bronzeDark}/>
      {/* handle */}
      <path d="M22 22 q0 -10 10 -10 q10 0 10 10" stroke={C.bronzeDark} strokeWidth="2.4" fill="none"/>
      {/* items poking out */}
      <ellipse cx="22" cy="22" rx="4" ry="6" fill={C.coral}/>
      <path d="M22 17 q-1 -4 1 -5" stroke={C.mint} strokeWidth="1.6" fill="none" strokeLinecap="round"/>
      <ellipse cx="32" cy="20" rx="5" ry="3" fill={C.mint}/>
      <ellipse cx="32" cy="20" rx="2.5" ry="1.4" fill={C.mintDark} opacity=".5"/>
      <circle cx="42" cy="22" r="4" fill={C.gold}/>
      <path d="M42 19 q1 -3 3 -3" stroke={C.mintDark} strokeWidth="1.4" fill="none" strokeLinecap="round"/>
    </>),
  },

  // ============== COOKING CUISINES ==============
  // Each is a small, identifiable food sticker.
  'middle-east': {
    cat: 'cooking',
    draw: () => (<>
      {/* kebab skewer */}
      <path d="M8 32 h48" stroke={C.bronzeDark} strokeWidth="2" strokeLinecap="round"/>
      <rect x="14" y="26" width="8" height="12" rx="2" fill={C.coralDark}/>
      <rect x="24" y="26" width="8" height="12" rx="2" fill={C.gold}/>
      <rect x="34" y="26" width="8" height="12" rx="2" fill={C.coralDark}/>
      <rect x="44" y="26" width="6" height="12" rx="2" fill={C.mint}/>
      {/* steam */}
      <path d="M20 22 q-2 -4 0 -8 M30 22 q-2 -4 0 -8" stroke={C.white} strokeWidth="1.8" fill="none" strokeLinecap="round" opacity=".9"/>
    </>),
  },

  asian: {
    cat: 'cooking',
    draw: () => (<>
      {/* rice bowl */}
      <path d="M10 30 h44 q-2 18 -22 18 q-20 0 -22 -18z" fill={C.coral}/>
      <ellipse cx="32" cy="30" rx="22" ry="4" fill={C.cream}/>
      {/* rice grains */}
      <ellipse cx="24" cy="29" rx="2" ry="1" fill={C.white}/>
      <ellipse cx="32" cy="28" rx="2" ry="1" fill={C.white}/>
      <ellipse cx="40" cy="29" rx="2" ry="1" fill={C.white}/>
      {/* chopsticks */}
      <path d="M48 8 l-12 22" stroke={C.bronze} strokeWidth="2.4" strokeLinecap="round"/>
      <path d="M52 12 l-12 22" stroke={C.bronze} strokeWidth="2.4" strokeLinecap="round"/>
    </>),
  },

  chinese: {
    cat: 'cooking',
    draw: () => (<>
      {/* dumpling */}
      <path d="M10 38 q4 -16 22 -16 q18 0 22 16 z" fill={C.cream}/>
      <path d="M10 38 q22 8 44 0 v4 q-22 8 -44 0z" fill={C.gold}/>
      {/* pleats */}
      <path d="M16 32 q2 -3 4 0 M22 28 q2 -3 4 0 M28 26 q2 -3 4 0 M34 26 q2 -3 4 0 M40 28 q2 -3 4 0 M46 32 q2 -3 4 0" stroke={C.bronze} strokeWidth="1.4" fill="none" strokeLinecap="round"/>
      {/* steam */}
      <path d="M28 20 q-2 -4 0 -8 M36 20 q-2 -4 0 -8" stroke={C.white} strokeWidth="1.8" fill="none" strokeLinecap="round" opacity=".7"/>
    </>),
  },

  french: {
    cat: 'cooking',
    draw: () => (<>
      {/* baguette */}
      <ellipse cx="32" cy="32" rx="22" ry="8" fill={C.gold}/>
      <ellipse cx="32" cy="30" rx="20" ry="6" fill={C.goldLight}/>
      {/* slashes */}
      <path d="M18 28 l4 6 M26 26 l4 8 M34 26 l4 8 M42 28 l4 6" stroke={C.bronze} strokeWidth="1.4" strokeLinecap="round"/>
      {/* eiffel hint */}
      <path d="M48 12 l-3 10 h6z" fill={C.trust}/>
      <rect x="46" y="20" width="4" height="3" fill={C.trust}/>
    </>),
  },

  indian: {
    cat: 'cooking',
    draw: () => (<>
      {/* curry bowl */}
      <path d="M8 32 h48 q-2 16 -24 16 q-22 0 -24 -16z" fill={C.coralDark}/>
      <ellipse cx="32" cy="32" rx="24" ry="4" fill={C.coral}/>
      {/* naan on side */}
      <ellipse cx="50" cy="14" rx="8" ry="4" fill={C.gold} transform="rotate(-20 50 14)"/>
      <ellipse cx="50" cy="14" rx="6" ry="3" fill={C.goldLight} transform="rotate(-20 50 14)"/>
      {/* spice dots */}
      <circle cx="22" cy="32" r="1" fill={C.coralDeep}/>
      <circle cx="32" cy="33" r="1" fill={C.coralDeep}/>
      <circle cx="42" cy="32" r="1" fill={C.coralDeep}/>
      {/* cilantro */}
      <circle cx="28" cy="30" r="1.2" fill={C.mint}/>
      <circle cx="38" cy="31" r="1.2" fill={C.mint}/>
    </>),
  },

  italian: {
    cat: 'cooking',
    draw: () => (<>
      {/* pizza slice */}
      <path d="M10 14 L54 28 L18 50 z" fill={C.gold}/>
      <path d="M14 18 L48 28 L22 44 z" fill={C.coral}/>
      {/* cheese drips */}
      <ellipse cx="24" cy="28" rx="3" ry="2" fill={C.cream}/>
      <ellipse cx="36" cy="32" rx="2.5" ry="1.6" fill={C.cream}/>
      {/* pepperoni */}
      <circle cx="22" cy="32" r="2.2" fill={C.coralDeep}/>
      <circle cx="36" cy="38" rx="2" fill={C.coralDeep} r="2"/>
      {/* basil */}
      <ellipse cx="30" cy="28" rx="1.6" ry="1" fill={C.mint}/>
    </>),
  },

  japanese: {
    cat: 'cooking',
    draw: () => (<>
      {/* sushi piece */}
      <ellipse cx="32" cy="36" rx="22" ry="10" fill={C.cream}/>
      <ellipse cx="32" cy="32" rx="22" ry="6" fill={C.coral}/>
      {/* nori band */}
      <rect x="26" y="22" width="12" height="22" fill={C.ink}/>
      {/* rice texture */}
      <circle cx="14" cy="38" r="1" fill={C.white}/>
      <circle cx="50" cy="38" r="1" fill={C.white}/>
      <circle cx="18" cy="40" r="1" fill={C.white}/>
      <circle cx="46" cy="40" r="1" fill={C.white}/>
      {/* sesame */}
      <circle cx="32" cy="30" r="1" fill={C.gold}/>
    </>),
  },

  thai: {
    cat: 'cooking',
    draw: () => (<>
      {/* noodle bowl */}
      <path d="M8 32 h48 q-2 16 -24 16 q-22 0 -24 -16z" fill={C.gold}/>
      <ellipse cx="32" cy="32" rx="24" ry="4" fill={C.goldLight}/>
      {/* noodle swirls */}
      <path d="M14 32 q4 -2 8 0 q4 2 8 0 q4 -2 8 0 q4 2 8 0" stroke={C.cream} strokeWidth="1.6" fill="none"/>
      <path d="M14 36 q4 -2 8 0 q4 2 8 0 q4 -2 8 0 q4 2 8 0" stroke={C.cream} strokeWidth="1.6" fill="none"/>
      {/* chili */}
      <path d="M48 14 q4 4 4 10 q-2 -2 -6 -2 z" fill={C.coral}/>
      <path d="M48 14 q-1 -2 1 -3" stroke={C.mint} strokeWidth="1.4" fill="none" strokeLinecap="round"/>
      {/* lime */}
      <circle cx="14" cy="20" r="3" fill={C.mint}/>
    </>),
  },

  singaporean: {
    cat: 'cooking',
    draw: () => (<>
      {/* laksa-style bowl */}
      <path d="M8 32 h48 q-2 16 -24 16 q-22 0 -24 -16z" fill={C.coralDark}/>
      <ellipse cx="32" cy="32" rx="24" ry="4" fill={C.coral}/>
      {/* prawn */}
      <path d="M22 30 q4 -4 10 -2 q4 1 6 4 q-4 -1 -8 0 q-4 1 -8 -2z" fill={C.coralDeep}/>
      {/* egg slice */}
      <ellipse cx="44" cy="32" rx="4" ry="2.5" fill={C.cream}/>
      <ellipse cx="44" cy="32" rx="2" ry="1.4" fill={C.gold}/>
      {/* steam */}
      <path d="M20 22 q-2 -4 0 -8 M40 22 q-2 -4 0 -8" stroke={C.white} strokeWidth="1.8" fill="none" strokeLinecap="round" opacity=".9"/>
    </>),
  },

  vegetarian: {
    cat: 'cooking',
    draw: () => (<>
      {/* salad bowl */}
      <path d="M8 32 h48 q-2 16 -24 16 q-22 0 -24 -16z" fill={C.cream}/>
      <ellipse cx="32" cy="32" rx="24" ry="4" fill={C.mintDark}/>
      {/* veggies */}
      <circle cx="20" cy="30" r="3.5" fill={C.coralDark}/>
      <ellipse cx="30" cy="28" rx="3" ry="2" fill={C.mint}/>
      <ellipse cx="40" cy="30" rx="3" ry="2" fill={C.gold}/>
      <ellipse cx="48" cy="32" rx="3" ry="1.6" fill={C.coral}/>
      {/* leaf top */}
      <path d="M16 14 q4 -6 10 -4 q-2 4 -4 6 q-3 1 -6 -2z" fill={C.mint}/>
      <path d="M19 16 q3 -2 6 -1" stroke={C.mintDark} strokeWidth="1" fill="none"/>
    </>),
  },

  western: {
    cat: 'cooking',
    draw: () => (<>
      {/* burger */}
      <path d="M10 24 q4 -10 22 -10 q18 0 22 10 z" fill={C.gold}/>
      <ellipse cx="20" cy="20" rx="1.4" ry="1" fill={C.cream}/>
      <ellipse cx="34" cy="18" rx="1.4" ry="1" fill={C.cream}/>
      <rect x="8" y="26" width="48" height="4" fill={C.mint}/>
      <rect x="8" y="30" width="48" height="4" fill={C.coralDark}/>
      <rect x="8" y="34" width="48" height="3" fill={C.cream}/>
      <path d="M10 40 q4 8 22 8 q18 0 22 -8 z" fill={C.gold}/>
    </>),
  },

  pork: {
    cat: 'cooking',
    draw: () => (<>
      {/* pig face */}
      <ellipse cx="32" cy="34" rx="20" ry="16" fill={C.skinPink}/>
      <ellipse cx="32" cy="38" rx="9" ry="6" fill={C.blush}/>
      <ellipse cx="28" cy="38" rx="1.4" ry="2" fill={C.ink}/>
      <ellipse cx="36" cy="38" rx="1.4" ry="2" fill={C.ink}/>
      <circle cx="24" cy="32" r="1.2" fill={C.ink}/>
      <circle cx="40" cy="32" r="1.2" fill={C.ink}/>
      <path d="M14 22 q-2 -8 6 -10 q4 4 4 10 z" fill={C.skinPink}/>
      <path d="M50 22 q2 -8 -6 -10 q-4 4 -4 10 z" fill={C.skinPink}/>
      <path d="M16 21 q-1 -4 4 -7" stroke={C.blush} strokeWidth="1.2" fill="none" opacity=".7"/>
    </>),
  },

  // ============== OTHER SKILLS ==============
  baking: {
    cat: 'other',
    draw: () => (<>
      <ellipse cx="32" cy="20" rx="14" ry="10" fill={C.white}/>
      <ellipse cx="22" cy="20" rx="6" ry="8" fill={C.white}/>
      <ellipse cx="42" cy="20" rx="6" ry="8" fill={C.white}/>
      <rect x="18" y="28" width="28" height="6" rx="1" fill={C.coralDark}/>
      <rect x="20" y="29" width="24" height="1.4" rx=".7" fill={C.coral}/>
      <path d="M44 38 l8 12" stroke={C.bronze} strokeWidth="2.5" strokeLinecap="round"/>
      <ellipse cx="42" cy="38" rx="4" ry="6" fill={C.gold}/>
      <path d="M40 34 l3 8 M44 34 l-3 8" stroke={C.bronzeDark} strokeWidth=".8"/>
      <path d="M14 42 q4 -6 10 -4 q4 2 4 6 q-2 4 -8 4 q-4 0 -6 -2 z" fill={C.gold}/>
      <path d="M16 44 q4 -3 10 -2" stroke={C.bronzeDark} strokeWidth=".8" fill="none"/>
      <circle cx="50" cy="14" r="1.4" fill={C.gold}/>
      <circle cx="14" cy="16" r="1" fill={C.coral}/>
    </>),
  },

  caregiver: {
    cat: 'other',
    draw: () => (<>
      {/* heart held by hands */}
      <path d="M32 50 c -10 -6 -16 -12 -16 -20 a8 8 0 0 1 16 -3 a8 8 0 0 1 16 3 c 0 8 -6 14 -16 20z" fill={C.coral}/>
      <ellipse cx="22" cy="38" rx="3" ry="1.6" fill={C.coralDark} opacity=".5"/>
      {/* cross inside */}
      <rect x="30" y="30" width="4" height="14" rx="1" fill={C.white}/>
      <rect x="25" y="35" width="14" height="4" rx="1" fill={C.white}/>
      {/* hand cradle */}
      <path d="M8 44 q4 -2 10 0 q4 2 6 6" stroke={C.skin} strokeWidth="3.6" fill="none" strokeLinecap="round"/>
      <path d="M56 44 q-4 -2 -10 0 q-4 2 -6 6" stroke={C.skin} strokeWidth="3.6" fill="none" strokeLinecap="round"/>
    </>),
  },

  'car-wash': {
    cat: 'other',
    draw: () => (<>
      {/* mini car */}
      <path d="M14 38 q3 -8 10 -10 h16 q7 2 10 10 v6 H14z" fill={C.mint}/>
      <path d="M18 36 q3 -6 6 -6 h16 q3 0 6 6z" fill={C.cream}/>
      <circle cx="22" cy="46" r="4" fill={C.ink}/>
      <circle cx="42" cy="46" r="4" fill={C.ink}/>
      {/* foam bubbles */}
      <circle cx="14" cy="22" r="3" fill={C.white}/>
      <circle cx="20" cy="16" r="2.4" fill={C.white}/>
      <circle cx="28" cy="14" r="3.2" fill={C.white}/>
      <circle cx="38" cy="14" r="2.4" fill={C.white}/>
      <circle cx="46" cy="18" r="3" fill={C.white}/>
      <circle cx="52" cy="22" r="2.6" fill={C.white}/>
      {/* water spray */}
      <path d="M52 28 l4 -4 M54 32 l5 -2" stroke={C.trust} strokeWidth="1.6" strokeLinecap="round"/>
    </>),
  },

  computer: {
    cat: 'other',
    draw: () => (<>
      {/* laptop body */}
      <rect x="8" y="14" width="48" height="32" rx="3" fill={C.ink}/>
      <rect x="11" y="17" width="42" height="26" fill={C.trustLight}/>
      {/* code lines */}
      <rect x="14" y="22" width="8" height="2" rx="1" fill={C.coral}/>
      <rect x="24" y="22" width="14" height="2" rx="1" fill={C.cream}/>
      <rect x="14" y="27" width="20" height="2" rx="1" fill={C.mint}/>
      <rect x="14" y="32" width="6" height="2" rx="1" fill={C.gold}/>
      <rect x="22" y="32" width="14" height="2" rx="1" fill={C.cream}/>
      {/* cursor */}
      <rect x="38" y="32" width="2" height="3" fill={C.white}/>
      {/* base */}
      <path d="M4 46 h56 l-3 4 h-50z" fill="#9A8B7F"/>
    </>),
  },

  'driving-licence': {
    cat: 'other',
    draw: () => (<>
      {/* card */}
      <rect x="6" y="14" width="52" height="36" rx="4" fill={C.trust}/>
      <rect x="6" y="14" width="52" height="8" fill={C.trustLight}/>
      {/* photo */}
      <circle cx="20" cy="32" r="6" fill={C.skin}/>
      <path d="M14 42 q2 -4 6 -4 q4 0 6 4z" fill={C.skin}/>
      {/* lines */}
      <rect x="32" y="26" width="20" height="2.4" rx="1" fill={C.cream}/>
      <rect x="32" y="32" width="16" height="2.4" rx="1" fill={C.cream} opacity=".7"/>
      <rect x="32" y="38" width="14" height="2.4" rx="1" fill={C.cream} opacity=".7"/>
      {/* check seal */}
      <circle cx="50" cy="44" r="5" fill={C.gold}/>
      <path d="M47 44 l2 2 l4 -4" stroke={C.white} strokeWidth="1.6" fill="none" strokeLinecap="round" strokeLinejoin="round"/>
    </>),
  },

  'first-aid': {
    cat: 'other',
    draw: () => (<>
      {/* kit body */}
      <rect x="8" y="20" width="48" height="32" rx="3" fill={C.coral}/>
      <rect x="8" y="20" width="48" height="6" fill={C.coralDark}/>
      {/* handle */}
      <rect x="22" y="14" width="20" height="6" rx="2" fill={C.coralDark}/>
      <rect x="24" y="16" width="16" height="3" rx="1" fill={C.coral}/>
      {/* white panel */}
      <rect x="14" y="30" width="36" height="18" rx="2" fill={C.white}/>
      {/* cross */}
      <rect x="29" y="32" width="6" height="14" rx="1" fill={C.coralDark}/>
      <rect x="23" y="37" width="18" height="4" rx="1" fill={C.coralDark}/>
      {/* clasp */}
      <rect x="30" y="24" width="4" height="3" fill={C.gold}/>
    </>),
  },

  gardening: {
    cat: 'other',
    draw: () => (<>
      {/* plant */}
      <rect x="20" y="36" width="24" height="18" rx="2" fill={C.bronze}/>
      <path d="M20 36 h24 l-2 -3 H22z" fill={C.bronzeDark}/>
      <ellipse cx="32" cy="40" rx="10" ry="2" fill={C.bronzeDarker} opacity=".5"/>
      {/* stem */}
      <path d="M32 36 v-12" stroke={C.mintDark} strokeWidth="2.4" strokeLinecap="round"/>
      {/* leaves */}
      <path d="M32 30 q-8 -2 -10 -8 q6 0 10 6z" fill={C.mint}/>
      <path d="M32 26 q8 -2 10 -8 q-6 0 -10 6z" fill={C.mint}/>
      {/* flower */}
      <circle cx="32" cy="18" r="4" fill={C.coral}/>
      <circle cx="32" cy="18" r="2" fill={C.gold}/>
      {/* petals around */}
      <circle cx="28" cy="14" r="2.4" fill={C.coral}/>
      <circle cx="36" cy="14" r="2.4" fill={C.coral}/>
      <circle cx="28" cy="22" r="2.4" fill={C.coral}/>
      <circle cx="36" cy="22" r="2.4" fill={C.coral}/>
    </>),
  },

  handyman: {
    cat: 'other',
    draw: () => (<>
      {/* wrench */}
      <path d="M48 14 a8 8 0 0 0 -10 10 l-22 22 a4 4 0 0 0 6 6 l22 -22 a8 8 0 0 0 10 -10 l-5 5 l-3 -3 l-3 -3z" fill={C.bronze}/>
      <circle cx="44" cy="20" r="3" fill={C.goldBg}/>
      {/* shine */}
      <path d="M22 42 l8 -8" stroke={C.goldLight} strokeWidth="1.6" strokeLinecap="round" opacity=".7"/>
      {/* screw */}
      <circle cx="14" cy="14" r="3" fill={C.gold}/>
      <path d="M12 14 h4 M14 12 v4" stroke={C.bronzeDark} strokeWidth="1"/>
    </>),
  },

  housework: {
    cat: 'other',
    draw: () => (<>
      {/* broom handle */}
      <path d="M48 8 L24 36" stroke={C.bronze} strokeWidth="3.5" strokeLinecap="round"/>
      {/* bristles */}
      <path d="M16 50 q2 -10 8 -14 l8 8 q-4 6 -14 8 z" fill={C.gold}/>
      <path d="M18 48 l4 -8 M22 50 l4 -8 M26 51 l4 -8" stroke={C.bronzeDark} strokeWidth="1" strokeLinecap="round"/>
      {/* sparkles */}
      <path d="M40 14 l2 2 l-2 2 l-2 -2z" fill={C.gold}/>
      <path d="M52 22 l1.5 1.5 l-1.5 1.5 l-1.5 -1.5z" fill={C.coral}/>
      <circle cx="44" cy="32" r="1.4" fill={C.white}/>
    </>),
  },

  sewing: {
    cat: 'other',
    draw: () => (<>
      {/* spool */}
      <rect x="14" y="14" width="20" height="6" rx="1" fill={C.bronzeDark}/>
      <rect x="14" y="40" width="20" height="6" rx="1" fill={C.bronzeDark}/>
      <rect x="16" y="20" width="16" height="20" fill={C.coral}/>
      <path d="M16 22 h16 M16 26 h16 M16 30 h16 M16 34 h16 M16 38 h16" stroke={C.coralDark} strokeWidth=".8"/>
      {/* needle */}
      <path d="M44 14 L52 50" stroke={C.cream} strokeWidth="1.4" strokeLinecap="round"/>
      <ellipse cx="44" cy="14" rx="2" ry="3" fill="#9A8B7F"/>
      <circle cx="44" cy="13" r="1" fill={C.bronzeDark}/>
      {/* thread looping */}
      <path d="M34 24 q8 0 10 -8" stroke={C.coral} strokeWidth="1.4" fill="none" strokeLinecap="round"/>
    </>),
  },

  swimming: {
    cat: 'other',
    draw: () => (<>
      {/* swimmer head */}
      <circle cx="20" cy="20" r="5" fill={C.skin}/>
      {/* goggles */}
      <ellipse cx="18" cy="19" rx="2" ry="1.2" fill={C.trust}/>
      <ellipse cx="22" cy="19" rx="2" ry="1.2" fill={C.trust}/>
      <path d="M16 19 h-3" stroke={C.trust} strokeWidth="1"/>
      {/* arm */}
      <path d="M22 24 q10 -4 18 4" stroke={C.skin} strokeWidth="3.6" fill="none" strokeLinecap="round"/>
      <ellipse cx="40" cy="29" rx="2.4" ry="1.6" fill={C.skin}/>
      {/* waves */}
      <path d="M4 38 q4 -4 8 0 q4 4 8 0 q4 -4 8 0 q4 4 8 0 q4 -4 8 0 q4 4 8 0" stroke={C.trust} strokeWidth="2.4" fill="none" strokeLinecap="round"/>
      <path d="M4 46 q4 -4 8 0 q4 4 8 0 q4 -4 8 0 q4 4 8 0 q4 -4 8 0 q4 4 8 0" stroke={C.trustLight} strokeWidth="2.4" fill="none" strokeLinecap="round" opacity=".8"/>
      {/* splash */}
      <circle cx="38" cy="26" r="1.2" fill={C.white}/>
      <circle cx="44" cy="22" r="1.2" fill={C.white}/>
    </>),
  },

  // ============== PERSONALITY ==============
  patient: {
    cat: 'personality',
    draw: () => (<>
      {/* hourglass */}
      <path d="M16 8 h32 v6 q0 8 -10 14 q10 6 10 14 v6 h-32 v-6 q0 -8 10 -14 q-10 -6 -10 -14z" fill={C.gold}/>
      <path d="M20 12 h24 v3 q0 5 -8 10 q8 5 8 10 v5 h-24 v-5 q0 -5 8 -10 q-8 -5 -8 -10z" fill={C.goldLight}/>
      <path d="M22 14 h20 q-2 6 -10 8 q-8 -2 -10 -8z" fill={C.coral}/>
      <circle cx="32" cy="30" r=".8" fill={C.coral}/>
      <circle cx="32" cy="32" r=".6" fill={C.coral}/>
      <path d="M22 50 q4 -3 10 -3 q6 0 10 3 v-2 q0 -4 -10 -8 q-10 4 -10 8z" fill={C.coral} opacity=".5"/>
      <rect x="14" y="6" width="36" height="3" rx="1" fill={C.bronzeDark}/>
      <rect x="14" y="55" width="36" height="3" rx="1" fill={C.bronzeDark}/>
    </>),
  },

  cheerful: {
    cat: 'personality',
    draw: () => (<>
      {/* sun face */}
      {/* rays */}
      <path d="M32 6 v6 M32 52 v6 M6 32 h6 M52 32 h6 M14 14 l4 4 M46 46 l4 4 M50 14 l-4 4 M18 46 l-4 4" stroke={C.gold} strokeWidth="3" strokeLinecap="round"/>
      <circle cx="32" cy="32" r="14" fill={C.gold}/>
      <circle cx="32" cy="32" r="14" fill={C.goldLight} opacity=".4"/>
      {/* face */}
      <ellipse cx="26" cy="30" rx="1.6" ry="2.2" fill={C.ink}/>
      <ellipse cx="38" cy="30" rx="1.6" ry="2.2" fill={C.ink}/>
      <ellipse cx="22" cy="34" rx="2.4" ry="1.6" fill={C.coral} opacity=".7"/>
      <ellipse cx="42" cy="34" rx="2.4" ry="1.6" fill={C.coral} opacity=".7"/>
      <path d="M26 36 Q32 42 38 36" stroke={C.coralDark} strokeWidth="1.8" fill="none" strokeLinecap="round"/>
    </>),
  },

  independent: {
    cat: 'personality',
    draw: () => (<>
      {/* paper plane */}
      <path d="M8 32 L52 12 L44 50 L32 38 z" fill={C.coral}/>
      <path d="M52 12 L32 38 L8 32z" fill={C.coralDark} opacity=".7"/>
      <path d="M32 38 L34 50 L44 50z" fill={C.coralDeep}/>
      {/* trail */}
      <path d="M8 32 q-4 4 -4 10" stroke={C.coral} strokeWidth="2" strokeLinecap="round" fill="none" opacity=".5" strokeDasharray="2 3"/>
      <circle cx="50" cy="14" r="1.4" fill={C.gold}/>
    </>),
  },

  detail: {
    cat: 'personality',
    draw: () => (<>
      {/* magnifier */}
      <circle cx="26" cy="26" r="14" fill={C.cream}/>
      <circle cx="26" cy="26" r="14" fill="none" stroke={C.trust} strokeWidth="3"/>
      {/* tiny details inside */}
      <circle cx="22" cy="24" r="1.4" fill={C.coral}/>
      <circle cx="30" cy="22" r="1" fill={C.mint}/>
      <circle cx="28" cy="30" r="1.2" fill={C.gold}/>
      <path d="M20 30 l4 -2" stroke={C.trust} strokeWidth="1" strokeLinecap="round"/>
      {/* handle */}
      <rect x="35" y="35" width="5" height="20" rx="2" fill={C.trust} transform="rotate(-45 38 45)"/>
      {/* shine */}
      <path d="M18 18 q-2 4 0 8" stroke={C.white} strokeWidth="2" fill="none" strokeLinecap="round" opacity=".7"/>
    </>),
  },

  warm: {
    cat: 'personality',
    draw: () => (<>
      {/* heart with sparkle */}
      <path d="M32 52 c -14 -8 -22 -16 -22 -26 a10 10 0 0 1 22 -4 a10 10 0 0 1 22 4 c 0 10 -8 18 -22 26z" fill={C.coral}/>
      <ellipse cx="22" cy="32" rx="4" ry="3" fill={C.white} opacity=".4"/>
      <path d="M50 14 l1.5 3 l3 1.5 l-3 1.5 l-1.5 3 l-1.5 -3 l-3 -1.5 l3 -1.5z" fill={C.gold}/>
      <circle cx="14" cy="20" r="1.4" fill={C.gold}/>
    </>),
  },

  calm: {
    cat: 'personality',
    draw: () => (<>
      {/* lotus / leaf */}
      <ellipse cx="32" cy="40" rx="22" ry="6" fill={C.trust} opacity=".3"/>
      <path d="M32 12 q-4 12 0 24 q4 -12 0 -24z" fill={C.mint}/>
      <path d="M16 22 q4 8 14 14 q-4 -12 -14 -14z" fill={C.mintDark}/>
      <path d="M48 22 q-4 8 -14 14 q4 -12 14 -14z" fill={C.mintDark}/>
      {/* dewdrop */}
      <path d="M32 8 q2 3 0 6 q-2 -3 0 -6z" fill={C.trust}/>
      {/* ripple */}
      <ellipse cx="32" cy="48" rx="10" ry="2" fill="none" stroke={C.trust} strokeWidth="1.4" opacity=".5"/>
      <ellipse cx="32" cy="50" rx="16" ry="2" fill="none" stroke={C.trust} strokeWidth="1.4" opacity=".3"/>
    </>),
  },

  reliable: {
    cat: 'personality',
    draw: () => (<>
      {/* shield */}
      <path d="M32 8 L52 14 v14 q0 14 -20 22 Q12 42 12 28 v-14z" fill={C.trust}/>
      <path d="M32 12 L48 17 v11 q0 11 -16 17 Q16 39 16 28 v-11z" fill={C.trustLight} opacity=".6"/>
      {/* check */}
      <path d="M22 30 l6 6 l14 -14" stroke={C.white} strokeWidth="3.4" fill="none" strokeLinecap="round" strokeLinejoin="round"/>
      <circle cx="50" cy="14" r="1.6" fill={C.gold}/>
    </>),
  },

  organized: {
    cat: 'personality',
    draw: () => (<>
      {/* checklist clipboard */}
      <rect x="10" y="10" width="44" height="46" rx="3" fill={C.cream}/>
      <rect x="10" y="10" width="44" height="6" fill={C.bronze}/>
      <rect x="22" y="6" width="20" height="8" rx="2" fill={C.bronzeDark}/>
      {/* rows */}
      <circle cx="18" cy="24" r="2.4" fill={C.mint}/>
      <path d="M16.5 24 l1.4 1.4 l2.6 -2.6" stroke={C.white} strokeWidth="1.4" fill="none" strokeLinecap="round"/>
      <rect x="24" y="22" width="22" height="2.5" rx="1" fill={C.ink} opacity=".7"/>
      <circle cx="18" cy="34" r="2.4" fill={C.mint}/>
      <path d="M16.5 34 l1.4 1.4 l2.6 -2.6" stroke={C.white} strokeWidth="1.4" fill="none" strokeLinecap="round"/>
      <rect x="24" y="32" width="18" height="2.5" rx="1" fill={C.ink} opacity=".7"/>
      <circle cx="18" cy="44" r="2.4" fill="none" stroke={C.mint} strokeWidth="1.6"/>
      <rect x="24" y="42" width="20" height="2.5" rx="1" fill={C.ink} opacity=".4"/>
    </>),
  },

  gentle: {
    cat: 'personality',
    draw: () => (<>
      {/* feather */}
      <path d="M48 8 q-4 28 -32 44 q-2 -8 4 -16 q-4 0 -2 -6 q4 -2 4 -8 q4 0 4 -6 q4 0 6 -4 q4 0 6 -4 q4 -2 10 0z" fill={C.coral}/>
      <path d="M44 12 q-4 22 -22 36" stroke={C.cream} strokeWidth="1.4" fill="none"/>
      <path d="M40 16 q-2 4 -2 8 M36 22 q-2 4 -2 8 M32 28 q-2 4 -2 8 M28 34 q-2 4 -2 8" stroke={C.coralDark} strokeWidth=".8" fill="none"/>
      {/* shine */}
      <ellipse cx="42" cy="14" rx="3" ry="2" fill={C.white} opacity=".5" transform="rotate(-30 42 14)"/>
    </>),
  },

  energetic: {
    cat: 'personality',
    draw: () => (<>
      {/* lightning bolt */}
      <path d="M32 4 L18 32 H28 L22 56 L46 28 H36 L42 4 z" fill={C.gold}/>
      <path d="M32 4 L20 30 H28 L22 56 z" fill={C.coral} opacity=".6"/>
      <path d="M32 4 L18 32 H22 L34 8 z" fill={C.white} opacity=".6"/>
      {/* sparks */}
      <circle cx="50" cy="14" r="1.6" fill={C.coral}/>
      <circle cx="14" cy="20" r="1.4" fill={C.coral}/>
      <circle cx="52" cy="42" r="1.4" fill={C.coral}/>
    </>),
  },

  // ============== GENDER ==============
  gender_female: {
    cat: 'gender',
    draw: () => (<>
      {/* shoulders */}
      <path d="M10 58 q4 -14 22 -14 q18 0 22 14 z" fill={C.coral}/>
      {/* neck */}
      <rect x="28" y="34" width="8" height="10" fill={C.skin}/>
      {/* hair back — single shape covering head + sides + top */}
      <path d="M16 30 q0 -22 16 -22 q16 0 16 22 q0 8 -2 18 q-3 -2 -5 -10 q0 -8 -2 -12 q-2 -2 -7 -2 q-5 0 -7 2 q-2 4 -2 12 q-2 8 -5 10 q-2 -10 -2 -18z" fill={C.coralDark}/>
      {/* face */}
      <ellipse cx="32" cy="30" rx="11" ry="12" fill={C.skin}/>
      <ellipse cx="27" cy="30" rx="1.4" ry="2" fill={C.ink}/>
      <ellipse cx="37" cy="30" rx="1.4" ry="2" fill={C.ink}/>
      <ellipse cx="22" cy="33" rx="2.2" ry="1.2" fill={C.coral} opacity=".55"/>
      <ellipse cx="42" cy="33" rx="2.2" ry="1.2" fill={C.coral} opacity=".55"/>
      <path d="M28 36 q4 3 8 0" stroke={C.coralDark} strokeWidth="1.6" fill="none" strokeLinecap="round"/>
      {/* venus symbol */}
      <circle cx="52" cy="12" r="4" fill="none" stroke={C.coral} strokeWidth="2"/>
      <path d="M52 16 v5 m-2.5 -2.5 h5" stroke={C.coral} strokeWidth="2" strokeLinecap="round"/>
    </>),
  },

  gender_male: {
    cat: 'gender',
    draw: () => (<>
      {/* male head */}
      <ellipse cx="32" cy="28" rx="13" ry="13" fill={C.skin}/>
      {/* short hair */}
      <path d="M18 24 q0 -14 14 -14 q14 0 14 14 q-3 -3 -7 -3 q-3 -2 -7 -2 q-4 0 -7 2 q-4 0 -7 3z" fill={C.bronzeDark}/>
      {/* face */}
      <ellipse cx="27" cy="28" rx="1.4" ry="2" fill={C.ink}/>
      <ellipse cx="37" cy="28" rx="1.4" ry="2" fill={C.ink}/>
      <path d="M28 34 q4 3 8 0" stroke={C.coralDark} strokeWidth="1.6" fill="none" strokeLinecap="round"/>
      {/* shoulders */}
      <path d="M10 58 q4 -14 22 -14 q18 0 22 14 z" fill={C.trust}/>
      {/* mars symbol */}
      <circle cx="48" cy="16" r="4.5" fill="none" stroke={C.trust} strokeWidth="2"/>
      <path d="M51 13 l5 -5 m-3 0 h3 v3" stroke={C.trust} strokeWidth="2" strokeLinecap="round" fill="none"/>
    </>),
  },

  gender_any: {
    cat: 'gender',
    draw: () => (<>
      {/* abstract "any" — infinity-like loop with sparkle, no human */}
      <circle cx="32" cy="32" r="24" fill={C.trustBg}/>
      {/* infinity loop */}
      <path d="M22 32 a8 8 0 1 1 8 8 a8 8 0 1 0 8 -8 a8 8 0 1 1 -8 -8 a8 8 0 1 0 -8 8z" fill="none" stroke={C.trust} strokeWidth="4" strokeLinecap="round"/>
      {/* dotted asterisk = "any value" */}
      <circle cx="22" cy="32" r="3" fill={C.coral}/>
      <circle cx="42" cy="32" r="3" fill={C.gold}/>
      {/* sparkle */}
      <path d="M52 14 l1.4 3 l3 1.4 l-3 1.4 l-1.4 3 l-1.4 -3 l-3 -1.4 l3 -1.4z" fill={C.gold}/>
    </>),
  },

  // ============== CATEGORY HEADERS ==============
  cat_language: {
    cat: 'cat',
    draw: () => (<>
      <path d="M14 14 h28 a6 6 0 0 1 6 6 v14 a6 6 0 0 1 -6 6 h-18 l-8 8 v-8 h-2 a6 6 0 0 1 -6 -6 v-14 a6 6 0 0 1 6 -6z" fill={C.trust}/>
      <text x="20" y="32" fontFamily="Inter" fontSize="11" fontWeight="700" fill={C.white}>A</text>
      <text x="30" y="32" fontFamily="Inter" fontSize="11" fontWeight="700" fill={C.white} opacity=".7">あ</text>
      <path d="M28 22 h22 a5 5 0 0 1 5 5 v10 a5 5 0 0 1 -5 5 h-3 v6 l-6 -6 h-13 a5 5 0 0 1 -5 -5 v-10 a5 5 0 0 1 5 -5z" fill={C.mint}/>
      <text x="34" y="36" fontFamily="Inter" fontSize="10" fontWeight="700" fill={C.white}>中</text>
    </>),
  },

  cat_main: {
    cat: 'cat',
    draw: () => (<>
      {/* stack of skill cards */}
      <rect x="8" y="22" width="32" height="32" rx="3" fill={C.coral} transform="rotate(-8 24 38)"/>
      <rect x="14" y="16" width="32" height="32" rx="3" fill={C.gold}/>
      <rect x="22" y="12" width="32" height="32" rx="3" fill={C.mint}/>
      <path d="M28 24 l4 4 l8 -8" stroke={C.white} strokeWidth="2.4" fill="none" strokeLinecap="round" strokeLinejoin="round"/>
      <rect x="28" y="34" width="16" height="2" rx="1" fill={C.white} opacity=".7"/>
    </>),
  },

  cat_cooking: {
    cat: 'cat',
    draw: () => (<>
      {/* mini chef hat */}
      <ellipse cx="32" cy="22" rx="14" ry="10" fill={C.white}/>
      <ellipse cx="22" cy="22" rx="6" ry="8" fill={C.white}/>
      <ellipse cx="42" cy="22" rx="6" ry="8" fill={C.white}/>
      <rect x="18" y="30" width="28" height="6" rx="1" fill={C.coralDark}/>
      <rect x="20" y="31" width="24" height="1.4" rx=".7" fill={C.coral}/>
      {/* fork & knife behind */}
      <rect x="14" y="38" width="2.4" height="14" rx="1" fill={C.bronze}/>
      <rect x="47.6" y="38" width="2.4" height="14" rx="1" fill={C.bronze}/>
    </>),
  },

  cat_other: {
    cat: 'cat',
    draw: () => (<>
      {/* toolkit grid */}
      <rect x="8" y="8" width="22" height="22" rx="3" fill={C.coral}/>
      <rect x="34" y="8" width="22" height="22" rx="3" fill={C.gold}/>
      <rect x="8" y="34" width="22" height="22" rx="3" fill={C.mint}/>
      <rect x="34" y="34" width="22" height="22" rx="3" fill={C.trust}/>
      {/* glyphs */}
      <path d="M16 14 q3 -2 6 0 q-2 4 -3 8 q-1 -4 -3 -8z" fill={C.white}/>
      <circle cx="45" cy="19" r="4" fill={C.white}/>
      <path d="M14 42 h10 v10 h-10z" fill={C.white}/>
      <path d="M42 42 l4 8 l4 -8 z" fill={C.white}/>
    </>),
  },

  cat_personality: {
    cat: 'cat',
    draw: () => (<>
      <circle cx="32" cy="30" r="20" fill={C.gold}/>
      <ellipse cx="26" cy="28" rx="1.6" ry="2.2" fill={C.ink}/>
      <ellipse cx="38" cy="28" rx="1.6" ry="2.2" fill={C.ink}/>
      <ellipse cx="22" cy="32" rx="2.4" ry="1.4" fill={C.coral} opacity=".7"/>
      <ellipse cx="42" cy="32" rx="2.4" ry="1.4" fill={C.coral} opacity=".7"/>
      <path d="M26 36 Q32 42 38 36" stroke={C.coralDark} strokeWidth="1.8" fill="none" strokeLinecap="round"/>
      {/* heart bubble */}
      <path d="M50 12 c -2 -3 -6 -1 -6 2 c 0 3 6 7 6 7 c 0 0 6 -4 6 -7 c 0 -3 -4 -5 -6 -2z" fill={C.coral}/>
    </>),
  },

  // ============== POSITIONS (Position select) ==============
  pos_helper: {
    cat: 'position',
    draw: () => (<>
      {/* shoulders / shirt — drawn first so head sits on top, no neck gap */}
      <path d="M10 58 q2 -20 22 -20 q20 0 22 20 z" fill={C.coral}/>
      {/* apron over shirt */}
      <path d="M22 40 h20 v18 h-20z" fill={C.cream}/>
      <path d="M22 40 q10 -3 20 0 v3 q-10 -3 -20 0z" fill={C.coralDark}/>
      {/* neck */}
      <rect x="28" y="28" width="8" height="6" fill={C.skin}/>
      {/* head */}
      <circle cx="32" cy="22" r="10" fill={C.skin}/>
      <path d="M22 20 q0 -12 10 -12 q10 0 10 12 q-2 -3 -10 -3 q-8 0 -10 3z" fill={C.bronzeDark}/>
      <circle cx="28" cy="22" r="1.4" fill={C.ink}/>
      <circle cx="36" cy="22" r="1.4" fill={C.ink}/>
      <path d="M30 26 q2 1.5 4 0" stroke={C.coralDark} strokeWidth="1.4" fill="none" strokeLinecap="round"/>
      <ellipse cx="24" cy="24" rx="1.8" ry="1.2" fill={C.coral} opacity=".5"/>
      <ellipse cx="40" cy="24" rx="1.8" ry="1.2" fill={C.coral} opacity=".5"/>
    </>),
  },
  pos_nanny: {
    cat: 'position',
    draw: () => (<>
      {/* adult body first */}
      <path d="M4 58 q4 -20 18 -20 q12 0 16 8 q4 4 12 12 v2 H4z" fill={C.mint}/>
      {/* neck */}
      <rect x="19" y="26" width="6" height="6" fill={C.skin}/>
      {/* head */}
      <circle cx="22" cy="20" r="8" fill={C.skin}/>
      <path d="M14 18 q0 -10 8 -10 q8 0 8 10 q-2 -3 -8 -3 q-6 0 -8 3z" fill={C.bronzeDark}/>
      <circle cx="20" cy="20" r="1" fill={C.ink}/>
      <circle cx="25" cy="20" r="1" fill={C.ink}/>
      <path d="M21 24 q1.5 1 3 0" stroke={C.coralDark} strokeWidth="1" fill="none" strokeLinecap="round"/>
      {/* baby bundle */}
      <ellipse cx="46" cy="42" rx="8" ry="6" fill={C.coralBg2}/>
      <circle cx="48" cy="40" r="3.6" fill={C.skinPink}/>
      <circle cx="47" cy="40" r=".5" fill={C.ink}/>
      <circle cx="49" cy="40" r=".5" fill={C.ink}/>
      <path d="M46 42 q2 1 4 0" stroke={C.coralDark} strokeWidth=".8" fill="none" strokeLinecap="round"/>
    </>),
  },
  pos_caregiver: {
    cat: 'position',
    draw: () => (<>
      {/* nurse-style cross + heart */}
      <circle cx="32" cy="32" r="22" fill={C.coral}/>
      <rect x="29" y="18" width="6" height="28" rx="1.5" fill={C.white}/>
      <rect x="18" y="29" width="28" height="6" rx="1.5" fill={C.white}/>
      <circle cx="32" cy="32" r="22" fill="none" stroke={C.coralDark} strokeWidth="2"/>
    </>),
  },
  pos_cook: {
    cat: 'position',
    draw: () => (<>
      {/* chef face under hat */}
      <ellipse cx="32" cy="14" rx="14" ry="8" fill={C.white}/>
      <ellipse cx="22" cy="16" rx="6" ry="6" fill={C.white}/>
      <ellipse cx="42" cy="16" rx="6" ry="6" fill={C.white}/>
      <rect x="18" y="22" width="28" height="4" rx="1" fill={C.coralDark}/>
      <circle cx="32" cy="36" r="11" fill={C.skin}/>
      <circle cx="28" cy="35" r="1.2" fill={C.ink}/>
      <circle cx="36" cy="35" r="1.2" fill={C.ink}/>
      <path d="M30 40 q2 1.5 4 0" stroke={C.coralDark} strokeWidth="1.2" fill="none" strokeLinecap="round"/>
      <ellipse cx="22" cy="38" rx="2" ry="1.4" fill={C.coral} opacity=".6"/>
      <ellipse cx="42" cy="38" rx="2" ry="1.4" fill={C.coral} opacity=".6"/>
      <path d="M16 56 q4 -10 16 -10 q12 0 16 10 z" fill={C.mint}/>
    </>),
  },
  pos_driver: {
    cat: 'position',
    draw: () => (<>
      {/* driver in car */}
      <path d="M8 38 q4 -12 14 -14 h20 q10 2 14 14 v8 H8z" fill={C.trust}/>
      <path d="M14 36 q3 -8 8 -8 h20 q5 0 8 8 z" fill={C.cream}/>
      {/* head silhouette inside */}
      <circle cx="32" cy="32" r="4.5" fill={C.skin}/>
      <path d="M28 36 q4 -2 8 0" stroke={C.coral} strokeWidth="2" fill="none" strokeLinecap="round"/>
      <circle cx="20" cy="46" r="6" fill={C.ink}/>
      <circle cx="20" cy="46" r="2.5" fill="#9A8B7F"/>
      <circle cx="44" cy="46" r="6" fill={C.ink}/>
      <circle cx="44" cy="46" r="2.5" fill="#9A8B7F"/>
      <circle cx="52" cy="40" r="2" fill={C.goldBg}/>
    </>),
  },

  // ============== FAMILY / HOUSEHOLD ==============
  adults: {
    cat: 'family',
    draw: () => (<>
      {/* two adults — bodies as single shape, heads on top */}
      <path d="M4 58 q4 -16 18 -16 q6 0 10 4 q4 -4 10 -4 q14 0 18 16 z" fill={C.coral}/>
      <path d="M28 50 v8" stroke={C.coralDeep} strokeWidth="1" opacity=".4"/>
      {/* necks */}
      <rect x="19" y="28" width="6" height="6" fill={C.skin}/>
      <rect x="39" y="28" width="6" height="6" fill={C.skin}/>
      {/* heads */}
      <circle cx="22" cy="22" r="8" fill={C.skin}/>
      <path d="M14 20 q0 -12 8 -12 q8 0 8 12 q-2 -3 -8 -3 q-6 0 -8 3z" fill={C.bronzeDark}/>
      <circle cx="19" cy="22" r="1.1" fill={C.ink}/>
      <circle cx="25" cy="22" r="1.1" fill={C.ink}/>
      <path d="M21 25 q1 1 2 0" stroke={C.coralDark} strokeWidth="1" fill="none" strokeLinecap="round"/>
      <circle cx="42" cy="22" r="8" fill={C.skin}/>
      <path d="M34 22 q-2 -12 8 -14 q10 2 8 14 q-2 -3 -8 -3 q-6 0 -8 3z" fill={C.ink}/>
      <circle cx="39" cy="22" r="1.1" fill={C.ink}/>
      <circle cx="45" cy="22" r="1.1" fill={C.ink}/>
      <path d="M41 25 q1 1 2 0" stroke={C.coralDark} strokeWidth="1" fill="none" strokeLinecap="round"/>
    </>),
  },
  kids: {
    cat: 'family',
    draw: () => (<>
      {/* two kids — one shared body silhouette, heads on top */}
      <path d="M8 58 q4 -16 14 -16 q4 0 6 2 q4 -2 8 -2 q4 0 6 2 q4 -2 6 -2 q10 0 14 16z" fill={C.mint}/>
      {/* necks */}
      <rect x="19" y="30" width="6" height="6" fill={C.skin}/>
      <rect x="39" y="30" width="6" height="6" fill={C.skin}/>
      {/* heads */}
      <circle cx="22" cy="24" r="7" fill={C.skin}/>
      <path d="M15 23 q0 -11 7 -11 q7 0 7 11 q-2 -3 -7 -3 q-5 0 -7 3z" fill={C.bronzeDark}/>
      <circle cx="19" cy="24" r="1.1" fill={C.ink}/>
      <circle cx="25" cy="24" r="1.1" fill={C.ink}/>
      <path d="M21 27 q1 1 2 0" stroke={C.coralDark} strokeWidth="1" fill="none" strokeLinecap="round"/>
      <circle cx="42" cy="24" r="7" fill={C.skin}/>
      <path d="M35 24 q0 -11 7 -11 q7 0 7 11 q-2 -3 -7 -3 q-5 0 -7 3z" fill={C.ink}/>
      <circle cx="39" cy="24" r="1.1" fill={C.ink}/>
      <circle cx="45" cy="24" r="1.1" fill={C.ink}/>
      <path d="M41 27 q1 1 2 0" stroke={C.coralDark} strokeWidth="1" fill="none" strokeLinecap="round"/>
      {/* heart between */}
      <path d="M32 44 c -2 -2 -5 -1 -5 2 c 0 3 5 5 5 5 c 0 0 5 -2 5 -5 c 0 -3 -3 -4 -5 -2z" fill={C.coral}/>
    </>),
  },
  pets_home: {
    cat: 'family',
    draw: () => (<>
      {/* dog + cat duo */}
      {/* dog */}
      <ellipse cx="20" cy="36" rx="11" ry="9" fill={C.bronze}/>
      <path d="M12 28 q-2 -6 4 -6 q3 4 3 8z" fill={C.bronzeDark}/>
      <path d="M28 28 q2 -6 -4 -6 q-3 4 -3 8z" fill={C.bronzeDark}/>
      <circle cx="17" cy="36" r="1.2" fill={C.ink}/>
      <circle cx="23" cy="36" r="1.2" fill={C.ink}/>
      <ellipse cx="20" cy="40" rx="1.6" ry="1.2" fill={C.ink}/>
      <path d="M19 41 q1 2 2 0" stroke={C.ink} strokeWidth=".8" fill="none"/>
      {/* cat */}
      <ellipse cx="44" cy="38" rx="10" ry="9" fill={C.gold}/>
      <path d="M37 32 l3 -8 l4 6z" fill={C.gold}/>
      <path d="M51 32 l-3 -8 l-4 6z" fill={C.gold}/>
      <circle cx="41" cy="38" r="1.2" fill={C.ink}/>
      <circle cx="47" cy="38" r="1.2" fill={C.ink}/>
      <path d="M44 41 l-1 1 h2z" fill={C.coral}/>
      <path d="M44 42 v2" stroke={C.ink} strokeWidth=".8"/>
      {/* whiskers */}
      <path d="M48 41 l4 0 M48 42 l4 1 M40 41 l-4 0 M40 42 l-4 1" stroke={C.ink} strokeWidth=".5"/>
    </>),
  },

  // ============== MARKETS (location) ==============
  market_TW: {
    cat: 'market',
    draw: () => (<>
      {/* taipei 101 silhouette */}
      <rect x="4" y="50" width="56" height="6" fill={C.mint} opacity=".5"/>
      {/* skyscraper */}
      <path d="M28 8 h8 l1 6 l-1 4 l1 6 l-1 4 l1 6 l-1 4 l1 6 l-1 6 h-8 l-1 -6 l1 -6 l-1 -4 l1 -6 l-1 -4 l1 -6 l-1 -4z" fill={C.coral}/>
      <rect x="30" y="4" width="4" height="6" fill={C.coralDark}/>
      <path d="M32 0 v4" stroke={C.coralDark} strokeWidth="1.4"/>
      {/* city */}
      <rect x="10" y="36" width="10" height="14" fill={C.bronze}/>
      <rect x="44" y="32" width="10" height="18" fill={C.bronzeDark}/>
      <rect x="12" y="38" width="2" height="2" fill={C.gold}/>
      <rect x="16" y="42" width="2" height="2" fill={C.gold}/>
      <rect x="46" y="34" width="2" height="2" fill={C.gold}/>
      <rect x="50" y="40" width="2" height="2" fill={C.gold}/>
    </>),
  },
  market_HK: {
    cat: 'market',
    draw: () => (<>
      {/* hong kong harbour skyline */}
      <rect x="0" y="46" width="64" height="12" fill={C.trust} opacity=".4"/>
      <path d="M0 50 q8 -4 16 0 q8 4 16 0 q8 -4 16 0 q8 4 16 0" stroke={C.trust} strokeWidth="1.4" fill="none" opacity=".6"/>
      <rect x="6" y="30" width="6" height="20" fill={C.coral}/>
      <rect x="14" y="22" width="8" height="28" fill={C.coralDark}/>
      <rect x="24" y="14" width="6" height="36" fill={C.gold}/>
      <path d="M30 14 l3 -6 l3 6z" fill={C.gold}/>
      <rect x="36" y="20" width="8" height="30" fill={C.bronze}/>
      <rect x="46" y="26" width="6" height="24" fill={C.bronzeDark}/>
      <rect x="54" y="32" width="6" height="18" fill={C.coral}/>
      {/* lit windows */}
      <rect x="16" y="26" width="2" height="2" fill={C.gold}/>
      <rect x="20" y="34" width="2" height="2" fill={C.gold}/>
      <rect x="38" y="26" width="2" height="2" fill={C.gold}/>
      <rect x="42" y="36" width="2" height="2" fill={C.gold}/>
    </>),
  },
  market_SG: {
    cat: 'market',
    draw: () => (<>
      {/* marina bay sands */}
      <rect x="0" y="46" width="64" height="12" fill={C.mint} opacity=".4"/>
      <rect x="8" y="20" width="8" height="28" fill={C.coral}/>
      <rect x="28" y="14" width="8" height="34" fill={C.coralDark}/>
      <rect x="48" y="22" width="8" height="26" fill={C.coral}/>
      <path d="M2 14 q4 -4 14 0 q4 -4 14 0 q4 -4 14 0 q4 -4 14 0 q4 -4 6 0 v4 H2z" fill={C.gold}/>
      <ellipse cx="20" cy="14" rx="2" ry="1" fill={C.cream}/>
      <ellipse cx="34" cy="14" rx="2" ry="1" fill={C.cream}/>
      <ellipse cx="48" cy="14" rx="2" ry="1" fill={C.cream}/>
      {/* lit windows */}
      <rect x="10" y="26" width="2" height="2" fill={C.goldBg}/>
      <rect x="30" y="22" width="2" height="2" fill={C.goldBg}/>
      <rect x="50" y="28" width="2" height="2" fill={C.goldBg}/>
    </>),
  },
  market_any: {
    cat: 'market',
    draw: () => (<>
      {/* globe */}
      <circle cx="32" cy="32" r="22" fill={C.trust}/>
      <ellipse cx="32" cy="32" rx="22" ry="9" fill="none" stroke={C.white} strokeWidth="1.4" opacity=".7"/>
      <path d="M32 10 v44 M14 22 q18 -6 36 0 M14 42 q18 6 36 0" stroke={C.white} strokeWidth="1.4" fill="none" opacity=".7"/>
      {/* continents */}
      <path d="M18 22 q4 -2 8 2 q-2 6 -8 6 q-2 -4 0 -8z" fill={C.mint}/>
      <path d="M36 26 q6 0 8 6 q-4 6 -10 4 q-2 -6 2 -10z" fill={C.mint}/>
      <path d="M22 40 q4 -2 8 0 q-2 4 -8 4 q-2 -2 0 -4z" fill={C.mint}/>
      {/* pin */}
      <path d="M48 12 c -3 0 -5 2 -5 5 c 0 4 5 8 5 8 c 0 0 5 -4 5 -8 c 0 -3 -2 -5 -5 -5z" fill={C.coral}/>
      <circle cx="48" cy="17" r="1.6" fill={C.white}/>
    </>),
  },

  // ============== AVAILABILITY / CONTRACT STATUS ==============
  status_available: {
    cat: 'status',
    draw: () => (<>
      {/* green check badge */}
      <circle cx="32" cy="32" r="22" fill={C.mint}/>
      <circle cx="32" cy="32" r="22" fill="none" stroke={C.mintDark} strokeWidth="2"/>
      <path d="M22 32 l8 8 l14 -16" stroke={C.white} strokeWidth="4" fill="none" strokeLinecap="round" strokeLinejoin="round"/>
    </>),
  },
  status_finished: {
    cat: 'status',
    draw: () => (<>
      {/* contract page with checkmark */}
      <rect x="14" y="8" width="36" height="48" rx="3" fill={C.cream}/>
      <rect x="14" y="8" width="36" height="6" fill={C.coral}/>
      <rect x="20" y="20" width="20" height="2" rx="1" fill={C.ink} opacity=".5"/>
      <rect x="20" y="26" width="24" height="2" rx="1" fill={C.ink} opacity=".5"/>
      <rect x="20" y="32" width="18" height="2" rx="1" fill={C.ink} opacity=".5"/>
      {/* signed signature */}
      <path d="M20 42 q3 -2 6 0 q3 2 6 -2 q3 -4 6 0" stroke={C.trust} strokeWidth="1.6" fill="none" strokeLinecap="round"/>
      {/* check seal */}
      <circle cx="48" cy="50" r="7" fill={C.mint}/>
      <path d="M44 50 l3 3 l5 -6" stroke={C.white} strokeWidth="2" fill="none" strokeLinecap="round" strokeLinejoin="round"/>
    </>),
  },
  status_terminated: {
    cat: 'status',
    draw: () => (<>
      {/* page torn */}
      <path d="M14 8 h36 v22 l-6 4 l-4 -3 l-6 4 l-4 -3 l-6 4 l-4 -3 l-6 4z" fill={C.cream}/>
      <rect x="14" y="8" width="36" height="6" fill={C.coralDark}/>
      <rect x="20" y="20" width="20" height="2" rx="1" fill={C.ink} opacity=".4"/>
      <path d="M14 30 l6 4 l4 -3 l6 4 l4 -3 l6 4 l4 -3 l6 4" stroke={C.coralDark} strokeWidth="1" fill="none"/>
      {/* X badge */}
      <circle cx="32" cy="48" r="9" fill={C.coral}/>
      <path d="M28 44 l8 8 M36 44 l-8 8" stroke={C.white} strokeWidth="2.4" strokeLinecap="round"/>
    </>),
  },
  status_break: {
    cat: 'status',
    draw: () => (<>
      {/* broken chain link */}
      <rect x="6" y="22" width="20" height="20" rx="10" fill="none" stroke={C.bronze} strokeWidth="5"/>
      <rect x="38" y="22" width="20" height="20" rx="10" fill="none" stroke={C.bronze} strokeWidth="5"/>
      {/* break flash */}
      <path d="M32 14 L28 30 L34 30 L30 50" stroke={C.coral} strokeWidth="3.5" fill="none" strokeLinecap="round" strokeLinejoin="round"/>
      <circle cx="32" cy="14" r="1.4" fill={C.gold}/>
      <circle cx="30" cy="50" r="1.4" fill={C.gold}/>
    </>),
  },
  status_transfer: {
    cat: 'status',
    draw: () => (<>
      {/* arrow swap between countries */}
      <circle cx="14" cy="32" r="9" fill={C.trust}/>
      <text x="9" y="36" fontFamily="Inter" fontSize="9" fontWeight="700" fill={C.white}>A</text>
      <circle cx="50" cy="32" r="9" fill={C.coral}/>
      <text x="46" y="36" fontFamily="Inter" fontSize="9" fontWeight="700" fill={C.white}>B</text>
      <path d="M22 26 h18 l-4 -4 M42 38 h-18 l4 4" stroke={C.bronzeDark} strokeWidth="2" fill="none" strokeLinecap="round" strokeLinejoin="round"/>
    </>),
  },
  status_new: {
    cat: 'status',
    draw: () => (<>
      {/* sparkle "NEW" badge */}
      <circle cx="32" cy="32" r="22" fill={C.gold}/>
      <path d="M32 8 l3 6 l6 1 l-4 5 l1 7 l-6 -3 l-6 3 l1 -7 l-4 -5 l6 -1z" fill={C.white}/>
      <text x="20" y="44" fontFamily="Inter" fontSize="10" fontWeight="800" fill={C.bronzeDark}>NEW</text>
    </>),
  },
  status_ending: {
    cat: 'status',
    draw: () => (<>
      {/* hourglass running low */}
      <path d="M16 8 h32 v6 q0 8 -10 14 q10 6 10 14 v6 h-32 v-6 q0 -8 10 -14 q-10 -6 -10 -14z" fill={C.gold}/>
      <path d="M22 14 h20 q-1 6 -10 10 q-9 -4 -10 -10z" fill={C.coral}/>
      {/* sand falling */}
      <path d="M28 28 q4 4 8 0 v8 q-4 -2 -8 0z" fill={C.coral} opacity=".7"/>
      <path d="M22 50 q4 -2 10 -2 q6 0 10 2 v-2 q0 -3 -10 -8 q-10 5 -10 8z" fill={C.coral}/>
      <rect x="14" y="6" width="36" height="3" rx="1" fill={C.bronzeDark}/>
      <rect x="14" y="55" width="36" height="3" rx="1" fill={C.bronzeDark}/>
      {/* clock urgency */}
      <circle cx="50" cy="50" r="7" fill={C.coral}/>
      <path d="M50 46 v4 l3 2" stroke={C.white} strokeWidth="1.6" fill="none" strokeLinecap="round"/>
    </>),
  },

  // ============== SCHEDULE / ACCOMMODATION ==============
  livein: {
    cat: 'schedule',
    draw: () => (<>
      {/* bed inside house */}
      <path d="M8 30 L32 12 L56 30 v22 H8z" fill={C.coral}/>
      <rect x="14" y="30" width="36" height="22" fill={C.cream}/>
      {/* bed */}
      <rect x="18" y="38" width="28" height="10" rx="1" fill={C.bronze}/>
      <rect x="18" y="36" width="28" height="4" rx="1" fill={C.bronzeDark}/>
      <rect x="20" y="32" width="8" height="6" rx="1" fill={C.cream}/>
      <rect x="22" y="34" width="6" height="2" fill={C.coralDark}/>
      {/* moon */}
      <path d="M48 14 a5 5 0 1 0 5 5 a4 4 0 0 1 -5 -5z" fill={C.gold}/>
    </>),
  },
  liveout: {
    cat: 'schedule',
    draw: () => (<>
      {/* commute: house → arrow → person */}
      <path d="M6 32 L18 22 L30 32 v18 H6z" fill={C.coral}/>
      <rect x="10" y="32" width="14" height="18" fill={C.cream}/>
      <rect x="14" y="38" width="6" height="12" fill={C.bronze}/>
      {/* arrow */}
      <path d="M32 38 h14 l-3 -4 M46 38 l-3 4" stroke={C.bronzeDark} strokeWidth="2.4" fill="none" strokeLinecap="round" strokeLinejoin="round"/>
      {/* person */}
      <circle cx="52" cy="32" r="5" fill={C.skin}/>
      <path d="M48 32 q0 -8 4 -8 q4 0 4 8z" fill={C.bronzeDark}/>
      <path d="M44 50 q2 -8 8 -8 q6 0 8 8 z" fill={C.mint}/>
    </>),
  },
  parttime: {
    cat: 'schedule',
    draw: () => (<>
      {/* clock */}
      <circle cx="32" cy="32" r="22" fill={C.cream}/>
      <circle cx="32" cy="32" r="22" fill="none" stroke={C.trust} strokeWidth="3"/>
      {/* tick marks */}
      <rect x="31" y="12" width="2" height="4" fill={C.trust}/>
      <rect x="31" y="48" width="2" height="4" fill={C.trust}/>
      <rect x="12" y="31" width="4" height="2" fill={C.trust}/>
      <rect x="48" y="31" width="4" height="2" fill={C.trust}/>
      {/* hands → 9 to 12 partial fill */}
      <path d="M32 32 L32 16 A16 16 0 0 1 46 32 z" fill={C.coral} opacity=".7"/>
      <path d="M32 32 L32 16" stroke={C.bronzeDark} strokeWidth="2.4" strokeLinecap="round"/>
      <path d="M32 32 L46 32" stroke={C.bronzeDark} strokeWidth="2.4" strokeLinecap="round"/>
      <circle cx="32" cy="32" r="2" fill={C.bronzeDark}/>
    </>),
  },
  dayoff: {
    cat: 'schedule',
    draw: () => (<>
      {/* calendar with circled day */}
      <rect x="8" y="14" width="48" height="42" rx="3" fill={C.cream}/>
      <rect x="8" y="14" width="48" height="10" fill={C.coral}/>
      <rect x="18" y="10" width="4" height="8" rx="1" fill={C.coralDeep}/>
      <rect x="42" y="10" width="4" height="8" rx="1" fill={C.coralDeep}/>
      {/* grid */}
      <rect x="12" y="28" width="40" height="24" fill={C.cream}/>
      <path d="M22 28 v24 M32 28 v24 M42 28 v24 M12 36 h40 M12 44 h40" stroke={C.t_line || '#E5DDD2'} strokeWidth=".8"/>
      {/* circled day */}
      <circle cx="37" cy="40" r="6" fill="none" stroke={C.mint} strokeWidth="2.4"/>
      <circle cx="37" cy="40" r="2" fill={C.mint}/>
      {/* sparkle */}
      <circle cx="50" cy="20" r="1.4" fill={C.white}/>
    </>),
  },
  flexible: {
    cat: 'schedule',
    draw: () => (<>
      {/* arrows in cycle */}
      <path d="M14 26 a18 18 0 0 1 32 -4 l-4 0 l6 6 l6 -6 l-4 0 a22 22 0 0 0 -36 4z" fill={C.mint}/>
      <path d="M50 38 a18 18 0 0 1 -32 4 l4 0 l-6 -6 l-6 6 l4 0 a22 22 0 0 0 36 -4z" fill={C.coral}/>
    </>),
  },

  // ============== JOB TYPE (employer side) ==============
  jt_livein: { cat: 'jobtype', draw: () => FLAT_ICONS.livein.draw() },
  jt_liveout: { cat: 'jobtype', draw: () => FLAT_ICONS.liveout.draw() },
  jt_parttime: { cat: 'jobtype', draw: () => FLAT_ICONS.parttime.draw() },

  // ============== FIELD-LEVEL HEADER ICONS ==============
  field_photo: {
    cat: 'cat',
    draw: () => (<>
      <rect x="6" y="14" width="52" height="40" rx="4" fill={C.coral}/>
      <rect x="10" y="18" width="44" height="32" rx="2" fill={C.cream}/>
      <circle cx="22" cy="28" r="3.4" fill={C.gold}/>
      <path d="M14 48 l10 -12 l8 8 l6 -6 l12 12z" fill={C.mint}/>
      {/* shutter dot */}
      <circle cx="48" cy="14" r="2" fill={C.coralDark}/>
    </>),
  },
  field_id: {
    cat: 'cat',
    draw: () => (<>
      <rect x="6" y="14" width="52" height="36" rx="4" fill={C.trust}/>
      <rect x="6" y="14" width="52" height="8" fill={C.trustLight}/>
      <circle cx="20" cy="32" r="6" fill={C.skin}/>
      <path d="M14 42 q2 -4 6 -4 q4 0 6 4z" fill={C.skin}/>
      <rect x="32" y="28" width="20" height="2.4" rx="1" fill={C.cream}/>
      <rect x="32" y="34" width="14" height="2.4" rx="1" fill={C.cream} opacity=".6"/>
    </>),
  },
  field_phone: {
    cat: 'cat',
    draw: () => (<>
      <rect x="18" y="6" width="28" height="52" rx="6" fill={C.ink}/>
      <rect x="22" y="14" width="20" height="32" rx="2" fill={C.mint}/>
      <circle cx="32" cy="52" r="2.4" fill={C.cream}/>
      <rect x="28" y="10" width="8" height="2" rx="1" fill={C.cream} opacity=".5"/>
      {/* signal/chat bubble */}
      <path d="M26 22 h12 v8 h-4 l-2 3 l-2 -3 h-4z" fill={C.cream}/>
    </>),
  },
  field_email: {
    cat: 'cat',
    draw: () => (<>
      <rect x="6" y="16" width="52" height="32" rx="3" fill={C.cream}/>
      <path d="M6 18 L32 38 L58 18" stroke={C.coral} strokeWidth="3" fill="none" strokeLinejoin="round"/>
      <rect x="6" y="16" width="52" height="32" rx="3" fill="none" stroke={C.coralDark} strokeWidth="2"/>
      {/* @ */}
      <circle cx="48" cy="44" r="7" fill={C.gold}/>
      <text x="44" y="48" fontFamily="Inter" fontSize="10" fontWeight="700" fill={C.white}>@</text>
    </>),
  },
  field_money: {
    cat: 'cat',
    draw: () => (<>
      <circle cx="32" cy="32" r="22" fill={C.gold}/>
      <circle cx="32" cy="32" r="22" fill="none" stroke={C.bronzeDark} strokeWidth="2"/>
      <text x="24" y="40" fontFamily="Inter" fontSize="22" fontWeight="800" fill={C.white}>$</text>
      {/* coin shine */}
      <ellipse cx="22" cy="22" rx="4" ry="2" fill={C.white} opacity=".5" transform="rotate(-30 22 22)"/>
    </>),
  },
  field_calendar: {
    cat: 'cat',
    draw: () => (<>
      <rect x="8" y="14" width="48" height="42" rx="3" fill={C.cream}/>
      <rect x="8" y="14" width="48" height="10" fill={C.trust}/>
      <rect x="18" y="10" width="4" height="8" rx="1" fill={C.bronzeDark}/>
      <rect x="42" y="10" width="4" height="8" rx="1" fill={C.bronzeDark}/>
      <circle cx="22" cy="36" r="2" fill={C.coral}/>
      <circle cx="32" cy="36" r="2" fill={C.mint}/>
      <circle cx="42" cy="36" r="2" fill={C.gold}/>
      <circle cx="22" cy="46" r="2" fill={C.coral} opacity=".5"/>
      <circle cx="32" cy="46" r="2" fill={C.mint} opacity=".5"/>
    </>),
  },
  field_pin: {
    cat: 'cat',
    draw: () => (<>
      <path d="M32 4 c -10 0 -18 8 -18 18 c 0 14 18 38 18 38 c 0 0 18 -24 18 -38 c 0 -10 -8 -18 -18 -18z" fill={C.coral}/>
      <circle cx="32" cy="22" r="7" fill={C.cream}/>
      <circle cx="32" cy="22" r="3" fill={C.coralDark}/>
    </>),
  },
  field_briefcase: {
    cat: 'cat',
    draw: () => (<>
      <rect x="8" y="20" width="48" height="32" rx="3" fill={C.bronze}/>
      <rect x="8" y="20" width="48" height="6" fill={C.bronzeDark}/>
      <rect x="22" y="14" width="20" height="6" rx="2" fill={C.bronzeDark}/>
      <rect x="24" y="16" width="16" height="2" fill={C.bronze}/>
      <rect x="14" y="30" width="36" height="16" rx="2" fill={C.cream}/>
      <rect x="28" y="36" width="8" height="4" fill={C.coral}/>
    </>),
  },
  field_user: {
    cat: 'cat',
    draw: () => (<>
      {/* body first */}
      <path d="M8 58 q4 -22 24 -22 q20 0 24 22 z" fill={C.coral}/>
      {/* neck */}
      <rect x="28" y="28" width="8" height="8" fill={C.skin}/>
      {/* head */}
      <circle cx="32" cy="22" r="10" fill={C.skin}/>
      <path d="M22 20 q0 -10 10 -10 q10 0 10 10 q-2 -3 -10 -3 q-8 0 -10 3z" fill={C.bronzeDark}/>
      <circle cx="28" cy="22" r="1.4" fill={C.ink}/>
      <circle cx="36" cy="22" r="1.4" fill={C.ink}/>
      <path d="M30 27 q2 1.5 4 0" stroke={C.coralDark} strokeWidth="1.4" fill="none" strokeLinecap="round"/>
    </>),
  },
  field_bio: {
    cat: 'cat',
    draw: () => (<>
      {/* speech / pencil on paper */}
      <rect x="10" y="12" width="44" height="40" rx="3" fill={C.cream}/>
      <rect x="14" y="20" width="28" height="2.4" rx="1" fill={C.ink} opacity=".4"/>
      <rect x="14" y="26" width="32" height="2.4" rx="1" fill={C.ink} opacity=".4"/>
      <rect x="14" y="32" width="22" height="2.4" rx="1" fill={C.ink} opacity=".4"/>
      <path d="M50 8 l8 8 l-22 22 l-8 -8z" fill={C.gold}/>
      <path d="M50 8 l8 8 l-3 3 l-8 -8z" fill={C.coral}/>
      <path d="M28 32 l-2 8 l8 -2z" fill={C.cream}/>
      <path d="M28 32 l-2 8 l3 -1z" fill={C.ink}/>
    </>),
  },
  field_review: {
    cat: 'cat',
    draw: () => (<>
      {/* checklist */}
      <rect x="10" y="10" width="44" height="48" rx="3" fill={C.cream}/>
      <circle cx="20" cy="22" r="3" fill={C.mint}/>
      <path d="M18.5 22 l1.4 1.4 l2.6 -2.6" stroke={C.white} strokeWidth="1.4" fill="none" strokeLinecap="round"/>
      <rect x="26" y="20" width="22" height="2.4" rx="1" fill={C.ink} opacity=".6"/>
      <circle cx="20" cy="34" r="3" fill={C.mint}/>
      <path d="M18.5 34 l1.4 1.4 l2.6 -2.6" stroke={C.white} strokeWidth="1.4" fill="none" strokeLinecap="round"/>
      <rect x="26" y="32" width="18" height="2.4" rx="1" fill={C.ink} opacity=".6"/>
      <circle cx="20" cy="46" r="3" fill={C.mint}/>
      <path d="M18.5 46 l1.4 1.4 l2.6 -2.6" stroke={C.white} strokeWidth="1.4" fill="none" strokeLinecap="round"/>
      <rect x="26" y="44" width="20" height="2.4" rx="1" fill={C.ink} opacity=".6"/>
    </>),
  },

  // ============== ADDITIONAL FIELD ICONS ==============
  field_whatsapp: {
    cat: 'cat',
    draw: () => (<>
      <circle cx="32" cy="32" r="24" fill="#25D366"/>
      <path d="M32 14 a18 18 0 0 0 -16 27 l-2 9 l9 -2 a18 18 0 1 0 9 -34z m0 32 a14 14 0 0 1 -7 -2 l-1 0 l-5 1 l1 -5 l-1 -1 a14 14 0 1 1 13 7z" fill={C.white}/>
      <path d="M25 24 q-1 -2 1 -3 q3 -1 4 1 q1 2 2 4 q0 1 -1 2 q-1 1 0 2 q2 4 6 6 q1 1 2 0 q1 -1 2 -1 q2 0 4 1 q2 1 1 3 q-1 3 -4 4 q-3 1 -8 -2 q-7 -4 -10 -10 q-2 -3 1 -7z" fill={C.white}/>
    </>),
  },

  field_age: {
    cat: 'cat',
    draw: () => (<>
      {/* birthday cake — clearer "age" semantics */}
      <rect x="14" y="32" width="36" height="20" rx="3" fill={C.coral}/>
      <rect x="14" y="38" width="36" height="3" fill={C.coralDark}/>
      <path d="M14 50 q9 -4 18 0 q9 4 18 0 v2 H14z" fill={C.cream}/>
      {/* candles */}
      <rect x="22" y="22" width="3" height="10" fill={C.gold}/>
      <rect x="30.5" y="20" width="3" height="12" fill={C.mint}/>
      <rect x="39" y="22" width="3" height="10" fill={C.trust}/>
      <ellipse cx="23.5" cy="20" rx="1.4" ry="2.4" fill={C.coral}/>
      <ellipse cx="32" cy="18" rx="1.4" ry="2.4" fill={C.coral}/>
      <ellipse cx="40.5" cy="20" rx="1.4" ry="2.4" fill={C.coral}/>
    </>),
  },

  field_gender: {
    cat: 'cat',
    draw: () => (<>
      {/* combined venus + mars symbol */}
      <circle cx="32" cy="36" r="14" fill="none" stroke={C.trust} strokeWidth="4"/>
      {/* mars arrow up-right */}
      <path d="M42 26 l10 -10 m-6 0 h6 v6" stroke={C.coral} strokeWidth="3.5" strokeLinecap="round" fill="none"/>
      {/* venus cross down */}
      <path d="M32 50 v8 m-4 -4 h8" stroke={C.gold} strokeWidth="3.5" strokeLinecap="round"/>
    </>),
  },

  field_marital: {
    cat: 'cat',
    draw: () => (<>
      {/* two interlocking rings */}
      <circle cx="24" cy="34" r="14" fill="none" stroke={C.gold} strokeWidth="4"/>
      <circle cx="40" cy="34" r="14" fill="none" stroke={C.coral} strokeWidth="4"/>
      {/* tiny gem on top */}
      <path d="M24 14 l3 5 l-3 4 l-3 -4z" fill={C.trust}/>
    </>),
  },

  field_religion: {
    cat: 'cat',
    draw: () => (<>
      {/* praying hands / lotus — neutral spiritual symbol */}
      <path d="M32 14 q-10 6 -14 18 q-2 8 4 14 q4 4 10 4 q6 0 10 -4 q6 -6 4 -14 q-4 -12 -14 -18z" fill={C.gold}/>
      <path d="M32 22 q-6 4 -8 12 q-1 5 2 9 q3 3 6 3 q3 0 6 -3 q3 -4 2 -9 q-2 -8 -8 -12z" fill={C.cream}/>
      <circle cx="32" cy="36" r="3" fill={C.coral}/>
    </>),
  },

  field_education: {
    cat: 'cat',
    draw: () => (<>
      {/* graduation cap */}
      <path d="M32 14 l24 10 l-24 10 l-24 -10z" fill={C.ink}/>
      <path d="M32 22 l24 -2 v8 l-24 4z" fill={C.coralDark} opacity=".001"/>
      {/* book under cap */}
      <path d="M14 36 q18 -4 36 0 v14 q-18 -4 -36 0z" fill={C.cream}/>
      <path d="M32 36 v14" stroke={C.ink} strokeWidth="1" opacity=".4"/>
      {/* tassel */}
      <path d="M52 26 v10" stroke={C.gold} strokeWidth="1.6"/>
      <circle cx="52" cy="38" r="2" fill={C.gold}/>
    </>),
  },

  field_position: {
    cat: 'cat',
    draw: () => (<>
      {/* ID badge */}
      <rect x="16" y="14" width="32" height="44" rx="3" fill={C.cream}/>
      <rect x="22" y="10" width="20" height="6" rx="2" fill={C.ink}/>
      <circle cx="32" cy="28" r="6" fill={C.skin}/>
      <path d="M28 26 q0 -8 4 -8 q4 0 4 8 q-2 -2 -4 -2 q-2 0 -4 2z" fill={C.bronzeDark}/>
      <path d="M22 44 q4 -8 10 -8 q6 0 10 8 v6 H22z" fill={C.coral}/>
      <rect x="22" y="52" width="20" height="2" rx="1" fill={C.ink} opacity=".4"/>
    </>),
  },

  field_jobtype: {
    cat: 'cat',
    draw: () => (<>
      {/* clock + calendar = job-type / schedule */}
      <rect x="10" y="14" width="44" height="40" rx="4" fill={C.cream}/>
      <rect x="10" y="14" width="44" height="10" fill={C.coral}/>
      <rect x="18" y="10" width="3" height="10" rx="1" fill={C.coralDark}/>
      <rect x="43" y="10" width="3" height="10" rx="1" fill={C.coralDark}/>
      <circle cx="32" cy="40" r="10" fill={C.mint}/>
      <path d="M32 33 v7 l5 3" stroke={C.white} strokeWidth="2.4" fill="none" strokeLinecap="round"/>
    </>),
  },

  field_contract: {
    cat: 'cat',
    draw: () => (<>
      {/* signed contract */}
      <rect x="14" y="10" width="36" height="48" rx="3" fill={C.cream}/>
      <rect x="20" y="18" width="22" height="2.4" rx="1" fill={C.ink} opacity=".4"/>
      <rect x="20" y="24" width="24" height="2.4" rx="1" fill={C.ink} opacity=".4"/>
      <rect x="20" y="30" width="18" height="2.4" rx="1" fill={C.ink} opacity=".4"/>
      {/* signature scribble */}
      <path d="M20 42 q4 -4 8 0 q4 4 8 -2 q3 -3 6 0" stroke={C.coral} strokeWidth="2" fill="none" strokeLinecap="round"/>
      {/* seal */}
      <circle cx="44" cy="50" r="6" fill={C.gold}/>
      <path d="M44 56 l-3 6 l3 -2 l3 2z" fill={C.gold}/>
    </>),
  },

  field_experience: {
    cat: 'cat',
    draw: () => (<>
      {/* bar chart slider */}
      <rect x="10" y="42" width="8" height="14" rx="1" fill={C.coralBg2}/>
      <rect x="22" y="34" width="8" height="22" rx="1" fill={C.coral}/>
      <rect x="34" y="24" width="8" height="32" rx="1" fill={C.coralDark}/>
      <rect x="46" y="14" width="8" height="42" rx="1" fill={C.gold}/>
      {/* upward arrow */}
      <path d="M14 44 q12 -10 24 -20 q6 -5 12 -10" stroke={C.trust} strokeWidth="2" fill="none" strokeLinecap="round"/>
      <path d="M52 12 l-4 1 l3 4z" fill={C.trust}/>
    </>),
  },

  field_accommodation: {
    cat: 'cat',
    draw: () => (<>
      {/* house with bed */}
      <path d="M32 10 l22 18 v4 H10 v-4z" fill={C.coralDark}/>
      <rect x="14" y="32" width="36" height="22" fill={C.cream}/>
      <rect x="14" y="32" width="36" height="22" fill="none" stroke={C.coralDark} strokeWidth="2"/>
      {/* bed */}
      <rect x="18" y="42" width="28" height="8" rx="1" fill={C.mint}/>
      <rect x="18" y="38" width="8" height="6" rx="1" fill={C.white}/>
      <rect x="18" y="50" width="28" height="2" fill={C.mintDark}/>
    </>),
  },

  field_flexibility: {
    cat: 'cat',
    draw: () => (<>
      {/* calendar with circular arrows = flexible date */}
      <rect x="10" y="14" width="44" height="40" rx="4" fill={C.cream}/>
      <rect x="10" y="14" width="44" height="10" fill={C.mint}/>
      <rect x="18" y="10" width="3" height="10" rx="1" fill={C.mintDark}/>
      <rect x="43" y="10" width="3" height="10" rx="1" fill={C.mintDark}/>
      {/* circular arrows */}
      <path d="M22 40 a10 10 0 0 1 18 -4" stroke={C.coral} strokeWidth="2.4" fill="none" strokeLinecap="round"/>
      <path d="M40 32 l2 6 l-6 0z" fill={C.coral}/>
      <path d="M42 44 a10 10 0 0 1 -18 4" stroke={C.coral} strokeWidth="2.4" fill="none" strokeLinecap="round"/>
      <path d="M24 52 l-2 -6 l6 0z" fill={C.coral}/>
    </>),
  },
};

// =========================================================================
// Public API — drop-in replacements for old SkillIcon / SkillDisc
// =========================================================================

const FlatIcon = ({ name, size = 24 }) => {
  const def = FLAT_ICONS[name];
  if (!def) return null;
  return (
    <svg width={size} height={size} viewBox="0 0 64 64" style={{display:'block'}}>
      {def.draw()}
    </svg>
  );
};

// Disc-wrapped icon — used as section header badge or chip prefix.
// `cat` is kept for backward compat but ignored — disc bg now comes from the icon's own palette.
const FlatIconDisc = ({ name, size = 'md', cat }) => {
  const def = FLAT_ICONS[name];
  const dims = size === 'lg' ? { box: 56, ic: 36, radius: 14 } :
               size === 'sm' ? { box: 26, ic: 20, radius: 8 } :
               size === 'xs' ? { box: 22, ic: 16, radius: 7 } :
                                { box: 36, ic: 26, radius: 10 };
  const bg = CAT_BG[def?.cat] || C.cream;
  return (
    <span style={{
      width: dims.box, height: dims.box, borderRadius: dims.radius,
      background: bg, display: 'inline-grid', placeItems: 'center', flexShrink: 0,
    }}>
      {def && <FlatIcon name={name} size={dims.ic}/>}
    </span>
  );
};

// Backward-compat aliases — old code uses SkillIcon / SkillDisc.
// During the flat-icon migration not every id has a flat illustration yet
// (e.g. personality traits like good-listener, hardworking, …). Capture the
// pre-existing monochrome SkillIcon set BEFORE overriding window so unmapped
// names fall through to the old line-art instead of rendering blank.
const LegacySkillIcon = window.SkillIcon;
const SkillIcon = ({ name, size = 18 }) => {
  if (FLAT_ICONS[name]) return <FlatIcon name={name} size={size}/>;
  if (LegacySkillIcon) return <LegacySkillIcon name={name} size={size}/>;
  return null;
};
const SkillDisc = (props) => <FlatIconDisc {...props}/>;

const HAS_FLAT_ICON = (id) => Object.prototype.hasOwnProperty.call(FLAT_ICONS, id);

Object.assign(window, {
  FlatIcon, FlatIconDisc, FLAT_ICONS, HAS_FLAT_ICON,
  // back-compat
  SkillIcon, SkillDisc,
});
