{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "fuzzy-mascot",
  "type": "registry:ui",
  "title": "Fuzzy Mascot",
  "description": "Plush SVG mascots in 15 shapes with cursor-tracking eyes, three states, five shadings and accessories.",
  "files": [
    {
      "path": "src/registry/ui/fuzzy-mascot.tsx",
      "type": "registry:ui",
      "content": "\"use client\";\n\nimport { useEffect, useId, useMemo, useRef, useState } from \"react\";\nimport {\n  animate,\n  motion,\n  useMotionTemplate,\n  useMotionValue,\n  useReducedMotion,\n  useSpring,\n  useTransform,\n  type MotionValue,\n} from \"motion/react\";\nimport { cn } from \"@/lib/utils\";\n\nexport const MASCOT_SHAPES = [\n  \"devsloka\",\n  \"circle\",\n  \"square\",\n  \"clover\",\n  \"flower\",\n  \"star\",\n  \"sun\",\n  \"hexagon\",\n  \"triangle\",\n  \"diamond\",\n  \"pill\",\n  \"bean\",\n  \"heart\",\n  \"cloud\",\n  \"blob\",\n  \"ghost\",\n  \"orb\",\n  \"bot\",\n  \"strawberry\",\n  \"mango\",\n] as const;\nexport const MASCOT_STATES = [\"idle\", \"working\", \"sleeping\"] as const;\nexport const MASCOT_SHADINGS = [\"fabric\", \"plastic\", \"crepe\", \"smooth\", \"flat\", \"glass\"] as const;\nexport const MASCOT_HATS = [\"none\", \"party\", \"beanie\", \"wizard\", \"tophat\"] as const;\nexport const MASCOT_GLASSES = [\"none\", \"round\", \"square\", \"sunglasses\"] as const;\n\nexport type MascotShape = (typeof MASCOT_SHAPES)[number];\nexport type MascotState = (typeof MASCOT_STATES)[number];\nexport type MascotShading = (typeof MASCOT_SHADINGS)[number];\nexport type MascotHat = (typeof MASCOT_HATS)[number];\nexport type MascotGlasses = (typeof MASCOT_GLASSES)[number];\n\nexport type FuzzyMascotProps = Omit<React.ComponentProps<\"div\">, \"children\"> & {\n  shape?: MascotShape;\n  /** Body colour. Defaults to a colour picked for the shape. */\n  color?: string;\n  state?: MascotState;\n  shading?: MascotShading;\n  hat?: MascotHat;\n  glasses?: MascotGlasses;\n  /** 0 (cropped) to 10 (shaggy). Only affects the fabric shading. */\n  furLength?: number;\n  /** Rendered size in px. */\n  size?: number;\n  /** Follow the pointer anywhere on the page with the eyes. */\n  trackPointer?: boolean;\n  /** Accessible name. Pass \"\" to mark the mascot decorative. */\n  label?: string;\n  /** Click (or Enter/Space) makes the mascot hop and spin. */\n  spinOnClick?: boolean;\n};\n\n// ─── Geometry ────────────────────────────────────────────────────────────────\n// Every shape is a list of points in a 200×200 box. Points (not hand-drawn\n// paths) let us find the top of the head for hats and keep curves smooth.\n\ntype Point = [number, number];\nconst TAU = Math.PI * 2;\nconst SAMPLES = 160;\n\n// A closed curve from a radius function, starting at the top and going clockwise.\nconst polar = (radius: (angle: number) => number, stretchX = 1, stretchY = 1): Point[] =>\n  Array.from({ length: SAMPLES }, (_, i) => {\n    const angle = (i / SAMPLES) * TAU - Math.PI / 2;\n    const r = radius(angle);\n    return [Math.cos(angle) * r * stretchX, Math.sin(angle) * r * stretchY];\n  });\n\nconst superellipse = (a: number, b: number, exponent: number): Point[] =>\n  Array.from({ length: SAMPLES }, (_, i) => {\n    const t = (i / SAMPLES) * TAU;\n    const c = Math.cos(t);\n    const s = Math.sin(t);\n    return [\n      a * Math.sign(c) * Math.abs(c) ** (2 / exponent),\n      b * Math.sign(s) * Math.abs(s) ** (2 / exponent),\n    ];\n  });\n\nconst polygon = (sides: number, rotation = 0, stretchY = 1): Point[] =>\n  Array.from({ length: sides }, (_, i) => {\n    const angle = rotation + (i / sides) * TAU - Math.PI / 2;\n    return [Math.cos(angle), Math.sin(angle) * stretchY];\n  });\n\n// Chaikin corner cutting: each pass rounds corners a little more.\nconst smooth = (points: Point[], passes: number): Point[] => {\n  let result = points;\n  for (let pass = 0; pass < passes; pass++) {\n    result = result.flatMap((point, i) => {\n      const next = result[(i + 1) % result.length];\n      return [\n        [point[0] * 0.75 + next[0] * 0.25, point[1] * 0.75 + next[1] * 0.25],\n        [point[0] * 0.25 + next[0] * 0.75, point[1] * 0.25 + next[1] * 0.75],\n      ] as Point[];\n    });\n  }\n  return result;\n};\n\n// The Devsloka logo's silhouette: straight left edge, round right side, cut bottom-left corner.\n// Wide shoulders tapering to a soft point, like a strawberry.\nconst strawberry = (): Point[] =>\n  smooth(\n    Array.from({ length: SAMPLES }, (_, i) => {\n      const angle = (i / SAMPLES) * TAU - Math.PI / 2;\n      const y = Math.sin(angle);\n      const down = (y + 1) / 2; // 0 at the top, 1 at the bottom\n      return [Math.cos(angle) * (1 - 0.55 * down ** 2.2), y < 0 ? y * 0.82 : y * 1.08] as Point;\n    }),\n    1\n  );\n\n// A plump, tilted oval with a gentle dent on one side, like a mango.\nconst mango = (): Point[] => {\n  const tilt = -0.42;\n  return polar(\n    (a) => 1 + 0.1 * Math.sin(a) - 0.07 * Math.exp(-((angleGap(a, Math.PI) / 0.55) ** 2)),\n    0.86,\n    1\n  ).map(([x, y]): Point => [x * Math.cos(tilt) - y * Math.sin(tilt), x * Math.sin(tilt) + y * Math.cos(tilt)]);\n};\n\nconst devsloka = (): Point[] => {\n  const points: Point[] = [[-1, 0.66], [-1, -1], [0, -1]];\n  for (let i = 1; i < 48; i++) {\n    const angle = -Math.PI / 2 + (i / 48) * Math.PI;\n    points.push([Math.cos(angle), Math.sin(angle)]);\n  }\n  points.push([0, 1], [-0.66, 1]);\n  return smooth(points, 3);\n};\n\nconst ghost = (): Point[] => {\n  const points: Point[] = [];\n  for (let i = 0; i <= 60; i++) {\n    const angle = Math.PI + (i / 60) * Math.PI; // head: left → top → right\n    points.push([Math.cos(angle), Math.sin(angle)]);\n  }\n  for (let i = 1; i <= 12; i++) points.push([1, (i / 12) * 1.05]); // right side\n  for (let i = 1; i < 72; i++) {\n    const x = 1 - (i / 72) * 2; // skirt: three hanging scallops\n    points.push([x, 1.05 + 0.16 * Math.abs(Math.sin(1.5 * Math.PI * (x + 1)))]);\n  }\n  for (let i = 0; i < 12; i++) points.push([-1, 1.05 - (i / 12) * 1.05]); // left side\n  return points;\n};\n\nconst heart = (): Point[] =>\n  Array.from({ length: SAMPLES }, (_, i) => {\n    const t = (i / SAMPLES) * TAU;\n    return [\n      16 * Math.sin(t) ** 3,\n      -(13 * Math.cos(t) - 5 * Math.cos(2 * t) - 2 * Math.cos(3 * t) - Math.cos(4 * t)),\n    ];\n  });\n\n// How far an angle sits from a target, wrapped to −π…π.\nconst angleGap = (a: number, b: number) => Math.atan2(Math.sin(a - b), Math.cos(a - b));\n\ntype ShapeDefinition = {\n  points: () => Point[];\n  color: string;\n  /** Moves the face up (−) or down (+) as a share of the body height. */\n  faceY?: number;\n  /** Signature characters keep their own material, whatever shading is picked. */\n  material?: \"glass\" | \"ink\";\n  /** A single big eye (centre and radius in the shape's own units), like the Devsloka logo's ring. */\n  eye?: { x: number; y: number; r: number };\n  /** Fruit details: skin markings inside the body and a crown on top. */\n  fruit?: \"strawberry\" | \"mango\";\n};\n\nconst SHAPES: Record<MascotShape, ShapeDefinition> = {\n  circle: { points: () => polar(() => 1), color: \"#F5A524\" },\n  square: { points: () => superellipse(1, 1, 5), color: \"#E46BD1\" },\n  clover: { points: () => polar((a) => 0.8 + 0.2 * Math.abs(Math.cos(2 * (a + Math.PI / 4)))), color: \"#3FA7F0\" },\n  flower: { points: () => polar((a) => 0.78 + 0.22 * Math.abs(Math.cos(2.5 * (a + Math.PI / 2)))), color: \"#4CC764\" },\n  star: {\n    points: () => polar((a) => 0.56 + 0.44 * ((Math.cos(5 * (a + Math.PI / 2)) + 1) / 2) ** 1.4),\n    color: \"#FFC93C\",\n  },\n  sun: { points: () => polar((a) => 0.9 + 0.1 * Math.cos(10 * (a + Math.PI / 2))), color: \"#FF8A3D\" },\n  hexagon: { points: () => smooth(polygon(6, Math.PI / 6), 4), color: \"#8B7CF6\" },\n  triangle: { points: () => smooth(polygon(3), 5), color: \"#2EC4B6\", faceY: 0.12 },\n  diamond: { points: () => smooth(polygon(4, 0, 1.2), 4), color: \"#5BC0EB\" },\n  pill: { points: () => superellipse(1.35, 0.82, 2.6), color: \"#F25F5C\" },\n  bean: {\n    points: () => polar((a) => 1 - 0.24 * Math.exp(-((angleGap(a, 0) / 0.55) ** 2)), 1.18, 0.95),\n    color: \"#9BC53D\",\n  },\n  heart: { points: heart, color: \"#FF5C8A\", faceY: -0.04 },\n  cloud: {\n    points: () =>\n      polar((a) => 0.84 + 0.18 * ((1 - Math.sin(a)) / 2) * Math.abs(Math.cos(3 * (a + Math.PI / 2))), 1.3, 1),\n    color: \"#C9D6F2\",\n  },\n  blob: {\n    points: () =>\n      polar((a) => 0.9 + 0.07 * Math.sin(2 * a + 0.5) + 0.05 * Math.sin(3 * a + 1.7) + 0.03 * Math.sin(5 * a + 0.3)),\n    color: \"#0A6EFF\",\n  },\n  ghost: { points: ghost, color: \"#ECEAF4\", faceY: -0.12 },\n  orb: { points: () => polar(() => 1), color: \"#5B4BFF\", faceY: -0.08, material: \"glass\" },\n  bot: { points: () => polar(() => 1), color: \"#111111\", faceY: 0, material: \"ink\" },\n  devsloka: { points: devsloka, color: \"#0A6EFF\", eye: { x: -0.06, y: 0.1, r: 0.74 } },\n  strawberry: { points: strawberry, color: \"#F2394B\", faceY: -0.08, fruit: \"strawberry\" },\n  mango: { points: mango, color: \"#FFB627\", faceY: -0.02, fruit: \"mango\" },\n};\n\nconst BOX = { cx: 100, cy: 110, size: 136 };\n\ntype Geometry = {\n  path: string;\n  cx: number;\n  top: number;\n  faceY: number;\n  bottom: number;\n  width: number;\n  bounds: { minX: number; maxX: number; minY: number; maxY: number };\n  eye?: { x: number; y: number; r: number };\n  fruit?: \"strawberry\" | \"mango\";\n};\n\nfunction buildGeometry(shape: MascotShape): Geometry {\n  const definition = SHAPES[shape];\n  const raw = definition.points();\n  const xs = raw.map((p) => p[0]);\n  const ys = raw.map((p) => p[1]);\n  const minX = Math.min(...xs);\n  const maxX = Math.max(...xs);\n  const minY = Math.min(...ys);\n  const maxY = Math.max(...ys);\n  const scale = BOX.size / Math.max(maxX - minX, maxY - minY);\n  // Rounded to one decimal so server and browser produce the same path string.\n  const round = (value: number) => Math.round(value * 10) / 10;\n  const points = raw.map(([x, y]): Point => [\n    round(BOX.cx + (x - (minX + maxX) / 2) * scale),\n    round(BOX.cy + (y - (minY + maxY) / 2) * scale),\n  ]);\n  const height = (maxY - minY) * scale;\n  const top = Math.min(...points.filter(([x]) => Math.abs(x - BOX.cx) < 12).map(([, y]) => y));\n  return {\n    path: `M${points.map(([x, y]) => `${x} ${y}`).join(\"L\")}Z`,\n    cx: BOX.cx,\n    top,\n    faceY: BOX.cy + (definition.faceY ?? -0.04) * height,\n    bottom: BOX.cy + height / 2,\n    width: (maxX - minX) * scale,\n    bounds: {\n      minX: Math.min(...points.map(([x]) => x)),\n      maxX: Math.max(...points.map(([x]) => x)),\n      minY: Math.min(...points.map(([, y]) => y)),\n      maxY: Math.max(...points.map(([, y]) => y)),\n    },\n    fruit: definition.fruit,\n    eye: definition.eye && {\n      x: round(BOX.cx + (definition.eye.x - (minX + maxX) / 2) * scale),\n      y: round(BOX.cy + (definition.eye.y - (minY + maxY) / 2) * scale),\n      r: round(definition.eye.r * scale),\n    },\n  };\n}\n\n// ─── Component ───────────────────────────────────────────────────────────────\n\nconst EYE_GAP = 19;\nconst EYE_LOOK = 7; // how far pupils travel, in viewBox units\nconst KEYFRAMES = `\n@keyframes mascot-breathe { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.025, 0.975) translateY(2%); } }\n@keyframes mascot-snooze { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.04, 0.96) translateY(3%); } }\n@keyframes mascot-bob { from { transform: translateY(0); } to { transform: translateY(-4%); } }\n@keyframes mascot-z { 0% { opacity: 0; transform: translate(0, 0) scale(0.8); } 30% { opacity: 1; } 100% { opacity: 0; transform: translate(10px, -24px) scale(1.1); } }\n@keyframes mascot-orbit { to { transform: rotate(360deg); } }\n`;\n\nexport function FuzzyMascot({\n  shape = \"blob\",\n  color,\n  state = \"idle\",\n  shading = \"fabric\",\n  hat = \"none\",\n  glasses = \"none\",\n  furLength = 5,\n  size = 160,\n  trackPointer = true,\n  label,\n  spinOnClick = true,\n  className,\n  style,\n  ...props\n}: FuzzyMascotProps) {\n  const rootRef = useRef<HTMLDivElement>(null);\n  const reduceMotion = !!useReducedMotion();\n  // useId returns characters that break url(#id) references in some browsers.\n  const id = useId().replace(/[^a-zA-Z0-9_-]/g, \"\");\n  const geometry = useMemo(() => buildGeometry(shape), [shape]);\n  const fill = color ?? SHAPES[shape].color;\n  const seed = MASCOT_SHAPES.indexOf(shape) + 1;\n  const fur = Math.max(0, Math.min(10, furLength));\n  const asleep = state === \"sleeping\";\n  const material: MascotShading | \"ink\" = SHAPES[shape].material ?? shading;\n\n  // Eye direction and body lean, smoothed with springs. Motion values, so pointer\n  // moves never re-render React.\n  const lookX = useMotionValue(0);\n  const lookY = useMotionValue(0);\n  const lean = useMotionValue(0);\n  const springConfig = reduceMotion ? { stiffness: 1000, damping: 100 } : { stiffness: 220, damping: 20 };\n  const eyeX = useSpring(lookX, springConfig);\n  const eyeY = useSpring(lookY, springConfig);\n  const bodyLean = useSpring(lean, springConfig);\n  const eyesTransform = useMotionTemplate`translate(${eyeX}px, ${eyeY}px)`;\n  // The single big eye has room to look further, so its pupil travels twice as far.\n  const bigPupilX = useTransform(eyeX, (v) => v * 2);\n  const bigPupilY = useTransform(eyeY, (v) => v * 2);\n  const bigPupilTransform = useMotionTemplate`translate(${bigPupilX}px, ${bigPupilY}px)`;\n  const leanTransform = useMotionTemplate`rotate(${bodyLean}deg)`;\n  const blink = useMotionValue(1);\n  const blinkTransform = useMotionTemplate`scaleY(${blink})`;\n  // Bot: the whole visor turns toward the pointer, and the eyes drift a little within it.\n  const visorX = useTransform(eyeX, (v) => v * 2.4);\n  const visorY = useTransform(eyeY, (v) => v * 1.6);\n  const visorTransform = useMotionTemplate`translate(${visorX}px, ${visorY}px)`;\n  const pupilX = useTransform(eyeX, (v) => v * 0.5);\n  const pupilY = useTransform(eyeY, (v) => v * 0.4);\n  const pupilTransform = useMotionTemplate`translate(${pupilX}px, ${pupilY}px)`;\n  const antennaLean = useTransform(bodyLean, (v) => v * 3);\n  const antennaTransform = useMotionTemplate`rotate(${antennaLean}deg)`;\n\n  // Click to spin: a crouch, a hop with a full turn, then a squishy landing.\n  const hopY = useMotionValue(0);\n  const spin = useMotionValue(0);\n  const squashX = useMotionValue(1);\n  const squashY = useMotionValue(1);\n  const hopTransform = useMotionTemplate`translateY(${hopY}px) rotate(${spin}deg)`;\n  const squashTransform = useMotionTemplate`scale(${squashX}, ${squashY})`;\n  const spinning = useRef(false);\n  const [cheering, setCheering] = useState(false);\n  const [burst, setBurst] = useState(0);\n\n  const celebrate = () => {\n    if (spinning.current) return;\n    spinning.current = true;\n    setCheering(true);\n    if (reduceMotion) {\n      // No hop or turn: a small happy pulse.\n      animate(squashX, [1, 1.06, 1], { duration: 0.3 });\n      animate(squashY, [1, 1.06, 1], { duration: 0.3 }).then(() => {\n        spinning.current = false;\n        setCheering(false);\n      });\n      return;\n    }\n    setBurst((n) => n + 1);\n    const duration = 1;\n    const times = [0, 0.14, 0.6, 0.74, 0.88, 1];\n    const rise = [0.2, 0.8, 0.4, 1] as const; // decelerates up\n    const fall = [0.6, 0, 0.8, 0.3] as const; // speeds up down, like gravity\n    animate(hopY, [0, 0, -size * 0.26, 0, -size * 0.04, 0], {\n      duration,\n      times,\n      ease: [\"linear\", rise, fall, rise, [0.4, 0, 0.6, 1]],\n    });\n    animate(squashX, [1, 1.14, 0.9, 1.16, 0.96, 1], { duration, times });\n    animate(squashY, [1, 0.84, 1.1, 0.86, 1.04, 1], { duration, times });\n    animate(spin, [0, -10, 360, 360, 360, 360], {\n      duration,\n      times,\n      ease: [\"easeOut\", [0.3, 0, 0.2, 1], \"linear\", \"linear\", \"linear\"],\n    }).then(() => {\n      spin.jump(0);\n      spinning.current = false;\n      setCheering(false);\n    });\n  };\n\n  useEffect(() => {\n    if (asleep) {\n      lookX.set(0);\n      lookY.set(0);\n      lean.set(0);\n      return;\n    }\n    if (state === \"working\") {\n      // Heads-down: eyes on the \"screen\" in front, ignoring the pointer.\n      lookX.set(-2);\n      lookY.set(EYE_LOOK * 0.7);\n      lean.set(0);\n      return;\n    }\n    if (!trackPointer) return;\n    let frame = 0;\n    let pointer: { x: number; y: number } | null = null;\n    const update = () => {\n      frame = 0;\n      const root = rootRef.current;\n      if (!root || !pointer) return;\n      const box = root.getBoundingClientRect();\n      const dx = pointer.x - (box.left + box.width / 2);\n      const dy = pointer.y - (box.top + box.height / 2);\n      const distance = Math.hypot(dx, dy) || 1;\n      // Full deflection from ~250px away; close in, the eyes move proportionally.\n      const reach = Math.min(1, distance / 250) * EYE_LOOK;\n      lookX.set((dx / distance) * reach);\n      lookY.set((dy / distance) * reach);\n      lean.set(Math.max(-1, Math.min(1, dx / 600)) * 4);\n    };\n    const handleMove = (event: PointerEvent) => {\n      pointer = { x: event.clientX, y: event.clientY };\n      if (!frame) frame = requestAnimationFrame(update);\n    };\n    const handleLeave = (event: PointerEvent) => {\n      if (event.relatedTarget) return;\n      pointer = null;\n      lookX.set(0);\n      lookY.set(0);\n      lean.set(0);\n    };\n    window.addEventListener(\"pointermove\", handleMove);\n    document.addEventListener(\"pointerout\", handleLeave);\n    return () => {\n      cancelAnimationFrame(frame);\n      window.removeEventListener(\"pointermove\", handleMove);\n      document.removeEventListener(\"pointerout\", handleLeave);\n    };\n  }, [asleep, state, trackPointer, lookX, lookY, lean]);\n\n  // Blink every few seconds while awake.\n  useEffect(() => {\n    if (asleep || reduceMotion) return;\n    let timer: ReturnType<typeof setTimeout>;\n    const schedule = () => {\n      timer = setTimeout(() => {\n        animate(blink, [1, 0.1, 1], { duration: 0.2, times: [0, 0.45, 1] });\n        schedule();\n      }, 2500 + Math.random() * 3500);\n    };\n    schedule();\n    return () => clearTimeout(timer);\n  }, [asleep, reduceMotion, blink]);\n\n  const eyeColor = material === \"glass\" ? \"white\" : \"#1d1b2e\";\n  const leftEye = geometry.cx - EYE_GAP;\n  const rightEye = geometry.cx + EYE_GAP;\n  const eyeY0 = geometry.faceY;\n\n  return (\n    <div\n      ref={rootRef}\n      data-slot=\"fuzzy-mascot\"\n      role={spinOnClick ? \"button\" : label === \"\" ? undefined : \"img\"}\n      tabIndex={spinOnClick ? 0 : undefined}\n      aria-hidden={!spinOnClick && label === \"\" ? true : undefined}\n      aria-label={!spinOnClick && label === \"\" ? undefined : (label || `${shape} mascot, ${state}`)}\n      onClick={spinOnClick ? celebrate : undefined}\n      onKeyDown={\n        spinOnClick\n          ? (event) => {\n              if (event.key === \"Enter\" || event.key === \" \") {\n                event.preventDefault();\n                celebrate();\n              }\n            }\n          : undefined\n      }\n      style={{ width: size, height: size, ...style }}\n      className={cn(\n        \"relative inline-block shrink-0 select-none\",\n        spinOnClick && \"cursor-pointer rounded-full outline-none focus-visible:ring-2 focus-visible:ring-[#0A6EFF] focus-visible:ring-offset-4 focus-visible:ring-offset-transparent\",\n        className\n      )}\n      {...props}\n    >\n      <style href=\"fuzzy-mascot-keyframes\" precedence=\"default\">\n        {KEYFRAMES}\n      </style>\n      {burst > 0 && <Sparkles key={burst} color={fill} size={size} />}\n      <motion.div className=\"absolute inset-0\" style={{ transform: leanTransform, transformOrigin: \"50% 90%\" }}>\n       <motion.div className=\"absolute inset-0\" style={{ transform: hopTransform }}>\n        <motion.div className=\"absolute inset-0\" style={{ transform: squashTransform, transformOrigin: \"50% 92%\" }}>\n        <div\n          className={cn(\n            \"absolute inset-0 origin-bottom motion-reduce:animate-none\",\n            state === \"idle\" && \"animate-[mascot-breathe_3.4s_ease-in-out_infinite]\",\n            state === \"working\" && \"animate-[mascot-bob_0.55s_ease-in-out_infinite_alternate]\",\n            asleep && \"animate-[mascot-snooze_4.8s_ease-in-out_infinite]\"\n          )}\n        >\n          {/* Body layer: filters and shading. It never changes while the eyes move. */}\n          <svg viewBox=\"0 0 200 200\" className=\"absolute inset-0 size-full overflow-visible\" aria-hidden>\n            <BodyDefs id={id} geometry={geometry} fur={fur} seed={seed} />\n            {material !== \"glass\" && (\n              <ellipse\n                cx={geometry.cx}\n                cy={geometry.bottom + 10}\n                rx={geometry.width * 0.36}\n                ry={7}\n                fill=\"black\"\n                opacity={0.28}\n                filter={`url(#${id}-soft)`}\n              />\n            )}\n            <Body id={id} geometry={geometry} fill={fill} shading={material} fur={fur} />\n            {geometry.fruit && hat === \"none\" && <FruitCrown kind={geometry.fruit} x={geometry.cx} y={geometry.top} />}\n            <Hat kind={hat} x={geometry.cx} y={geometry.top} />\n          </svg>\n\n          {/* Face layer: eyes, glasses and state effects, repainted on its own. */}\n          <svg viewBox=\"0 0 200 200\" className=\"pointer-events-none absolute inset-0 size-full overflow-visible\" aria-hidden>\n            {material === \"ink\" ? (\n              <BotFace\n                id={id}\n                geometry={geometry}\n                state={state}\n                cheering={cheering}\n                showAntenna={hat === \"none\"}\n                visorTransform={visorTransform}\n                pupilTransform={pupilTransform}\n                blinkTransform={blinkTransform}\n                antennaTransform={antennaTransform}\n              />\n            ) : geometry.eye ? (\n              <CyclopsEye\n                eye={geometry.eye}\n                state={state}\n                cheering={cheering}\n                glasses={glasses}\n                pupilTransform={bigPupilTransform}\n                blinkTransform={blinkTransform}\n              />\n            ) : (\n              <motion.g style={{ transform: eyesTransform }}>\n                <motion.g style={{ transform: blinkTransform, transformBox: \"fill-box\", transformOrigin: \"center\" }}>\n                  <Eyes\n                    left={leftEye}\n                    right={rightEye}\n                    y={eyeY0}\n                    state={state}\n                    cheering={cheering}\n                    color={eyeColor}\n                    pill={material === \"glass\"}\n                  />\n                </motion.g>\n              </motion.g>\n            )}\n\n            {material !== \"ink\" && !geometry.eye && <Glasses kind={glasses} left={leftEye} right={rightEye} y={eyeY0} />}\n\n            {state === \"working\" && (\n              // Loading dots orbit beside the head, clear of any hat.\n              <g\n                className=\"animate-[mascot-orbit_1.4s_linear_infinite] motion-reduce:animate-none\"\n                style={{ transformOrigin: `${geometry.cx + 58}px ${geometry.top + 6}px`, transformBox: \"view-box\" }}\n              >\n                {[0, 120, 240].map((deg) => (\n                  <circle\n                    key={deg}\n                    cx={geometry.cx + 58 + Math.cos((deg * Math.PI) / 180) * 9}\n                    cy={geometry.top + 6 + Math.sin((deg * Math.PI) / 180) * 9}\n                    r={3}\n                    fill={fill}\n                    opacity={0.9}\n                  />\n                ))}\n              </g>\n            )}\n\n            {asleep &&\n              [0, 1, 2].map((i) => (\n                <text\n                  key={i}\n                  x={geometry.cx + 34 + i * 8}\n                  y={geometry.top + 6 - i * 10}\n                  fontSize={12 + i * 3}\n                  fontWeight={700}\n                  fill=\"currentColor\"\n                  className=\"animate-[mascot-z_2.4s_ease-out_infinite] text-neutral-400 opacity-0 motion-reduce:animate-none motion-reduce:opacity-70\"\n                  style={{ animationDelay: `${i * 0.8}s`, transformBox: \"fill-box\" }}\n                >\n                  z\n                </text>\n              ))}\n          </svg>\n        </div>\n        </motion.div>\n       </motion.div>\n      </motion.div>\n    </div>\n  );\n}\n\n// ─── Body & shading ──────────────────────────────────────────────────────────\n\nfunction BodyDefs({ id, geometry, fur, seed }: { id: string; geometry: Geometry; fur: number; seed: number }) {\n  return (\n    <defs>\n      <clipPath id={`${id}-clip`}>\n        <path d={geometry.path} />\n      </clipPath>\n      {/* Volume: a soft top-left light and a bottom-right shade make the flat shape read as plump. */}\n      <radialGradient id={`${id}-light`} cx=\"34%\" cy=\"26%\" r=\"70%\">\n        <stop offset=\"0\" stopColor=\"white\" stopOpacity={0.55} />\n        <stop offset=\"0.55\" stopColor=\"white\" stopOpacity={0} />\n      </radialGradient>\n      <radialGradient id={`${id}-shade`} cx=\"62%\" cy=\"78%\" r=\"75%\">\n        <stop offset=\"0.35\" stopColor=\"black\" stopOpacity={0} />\n        <stop offset=\"1\" stopColor=\"black\" stopOpacity={0.38} />\n      </radialGradient>\n      <filter id={`${id}-soft`} x=\"-50%\" y=\"-200%\" width=\"200%\" height=\"500%\">\n        <feGaussianBlur stdDeviation={5} />\n      </filter>\n      {/* Fabric: noise pushes edge pixels outward into fibres; the length sets how far. */}\n      <filter id={`${id}-fur`} x=\"-25%\" y=\"-25%\" width=\"150%\" height=\"150%\">\n        <feTurbulence type=\"fractalNoise\" baseFrequency=\"0.8\" numOctaves={2} seed={seed} result=\"noise\" />\n        <feDisplacementMap in=\"SourceGraphic\" in2=\"noise\" scale={3 + fur * 2.2} xChannelSelector=\"R\" yChannelSelector=\"G\" />\n      </filter>\n      {/* Fine fibre grain laid over the fabric body. */}\n      <filter id={`${id}-grain`}>\n        <feTurbulence type=\"fractalNoise\" baseFrequency=\"1.6 0.6\" numOctaves={2} seed={seed + 7} />\n        <feColorMatrix type=\"saturate\" values=\"0\" />\n      </filter>\n      {/* Crêpe: stretched noise, lit from the top-left, multiplied into the body. */}\n      <filter id={`${id}-crepe`} x=\"0\" y=\"0\" width=\"100%\" height=\"100%\">\n        <feTurbulence type=\"fractalNoise\" baseFrequency=\"0.012 0.075\" numOctaves={3} seed={seed} result=\"noise\" />\n        <feDiffuseLighting in=\"noise\" surfaceScale={2.4} lightingColor=\"white\" result=\"light\">\n          <feDistantLight azimuth={225} elevation={52} />\n        </feDiffuseLighting>\n        <feComposite in=\"light\" in2=\"SourceGraphic\" operator=\"arithmetic\" k1={0.75} k2={0} k3={0.32} k4={0} result=\"lit\" />\n        <feComposite in=\"lit\" in2=\"SourceAlpha\" operator=\"in\" />\n      </filter>\n      <filter id={`${id}-gloss`} x=\"-20%\" y=\"-20%\" width=\"140%\" height=\"140%\">\n        <feGaussianBlur stdDeviation={4} />\n      </filter>\n    </defs>\n  );\n}\n\nfunction Body({\n  id,\n  geometry,\n  fill,\n  shading,\n  fur,\n}: {\n  id: string;\n  geometry: Geometry;\n  fill: string;\n  shading: MascotShading | \"ink\";\n  fur: number;\n}) {\n  const skin = geometry.fruit ? <FruitSkin id={id} geometry={geometry} /> : null;\n  const shape = (\n    <g>\n      <path d={geometry.path} fill={fill} />\n      {skin}\n    </g>\n  );\n  const volume = (\n    <g clipPath={`url(#${id}-clip)`}>\n      <rect width=\"200\" height=\"200\" fill={`url(#${id}-light)`} />\n      <rect width=\"200\" height=\"200\" fill={`url(#${id}-shade)`} />\n    </g>\n  );\n\n  switch (shading) {\n    case \"flat\":\n      return shape;\n    case \"ink\":\n      // A faint rim: invisible on light backgrounds, enough to outline the head on dark ones.\n      return (\n        <g>\n          {shape}\n          <path d={geometry.path} fill=\"none\" stroke=\"white\" strokeOpacity={0.14} strokeWidth={1.5} />\n        </g>\n      );\n    case \"glass\":\n      return (\n        <g>\n          <defs>\n            <radialGradient id={`${id}-glass`} cx=\"45%\" cy=\"30%\" r=\"80%\">\n              <stop offset=\"0\" style={{ stopColor: `color-mix(in oklab, ${fill} 45%, white)` }} />\n              <stop offset=\"0.45\" style={{ stopColor: fill }} />\n              <stop offset=\"1\" style={{ stopColor: `color-mix(in oklab, ${fill} 70%, black)` }} />\n            </radialGradient>\n            <radialGradient id={`${id}-underglow`} cx=\"50%\" cy=\"100%\" r=\"55%\">\n              <stop offset=\"0\" stopColor=\"#7CF3FF\" stopOpacity={0.95} />\n              <stop offset=\"1\" stopColor=\"#7CF3FF\" stopOpacity={0} />\n            </radialGradient>\n            <filter id={`${id}-bloom`} x=\"-50%\" y=\"-100%\" width=\"200%\" height=\"300%\">\n              <feGaussianBlur stdDeviation={10} />\n            </filter>\n          </defs>\n          {/* Light spilling onto the floor beneath a glowing glass body. */}\n          <ellipse cx={geometry.cx} cy={geometry.bottom - 2} rx={geometry.width * 0.38} ry={16} fill=\"#5CE1FF\" opacity={0.5} filter={`url(#${id}-bloom)`} />\n          <path d={geometry.path} fill={`url(#${id}-glass)`} />\n          {skin}\n          <g clipPath={`url(#${id}-clip)`}>\n            <rect width=\"200\" height=\"200\" fill={`url(#${id}-underglow)`} />\n            <ellipse cx={geometry.cx - 18} cy={geometry.top + 26} rx={34} ry={20} fill=\"white\" opacity={0.35} filter={`url(#${id}-gloss)`} />\n            {/* A soft bright rim, as light catches the edge of the glass. */}\n            <path d={geometry.path} fill=\"none\" stroke=\"white\" strokeOpacity={0.6} strokeWidth={7} filter={`url(#${id}-gloss)`} />\n          </g>\n        </g>\n      );\n    case \"smooth\":\n      return (\n        <g>\n          {shape}\n          {volume}\n        </g>\n      );\n    case \"plastic\":\n      return (\n        <g>\n          {shape}\n          {volume}\n          <g clipPath={`url(#${id}-clip)`}>\n            {/* A broad soft sheen plus a sharp hot spot: the two marks of a glossy surface. */}\n            <ellipse cx={geometry.cx - 22} cy={geometry.top + 30} rx={30} ry={18} fill=\"white\" opacity={0.55} filter={`url(#${id}-gloss)`} />\n            <ellipse cx={geometry.cx - 26} cy={geometry.top + 24} rx={8} ry={5} fill=\"white\" opacity={0.9} />\n          </g>\n          <path d={geometry.path} fill=\"none\" stroke=\"white\" strokeOpacity={0.25} strokeWidth={2} />\n        </g>\n      );\n    case \"crepe\":\n      return (\n        <g filter={`url(#${id}-crepe)`}>\n          {shape}\n          {volume}\n        </g>\n      );\n    case \"fabric\":\n    default:\n      return (\n        <g filter={fur > 0 ? `url(#${id}-fur)` : undefined}>\n          {shape}\n          <g clipPath={`url(#${id}-clip)`}>\n            <rect width=\"200\" height=\"200\" filter={`url(#${id}-grain)`} opacity={0.32} style={{ mixBlendMode: \"soft-light\" }} />\n          </g>\n          {volume}\n        </g>\n      );\n  }\n}\n\n// ─── Fruit ───────────────────────────────────────────────────────────────────\n\n// Markings on the fruit's skin, drawn inside the body so the shading (and fur) covers them.\nfunction FruitSkin({ id, geometry }: { id: string; geometry: Geometry }) {\n  const { bounds, cx, faceY } = geometry;\n  if (geometry.fruit === \"mango\") {\n    return (\n      <g clipPath={`url(#${id}-clip)`}>\n        <defs>\n          <radialGradient id={`${id}-blush`} cx=\"78%\" cy=\"82%\" r=\"70%\">\n            <stop offset=\"0\" stopColor=\"#F24C3D\" stopOpacity={0.85} />\n            <stop offset=\"0.55\" stopColor=\"#FF7A2F\" stopOpacity={0.45} />\n            <stop offset=\"1\" stopColor=\"#FF7A2F\" stopOpacity={0} />\n          </radialGradient>\n          <radialGradient id={`${id}-ripe`} cx=\"22%\" cy=\"18%\" r=\"55%\">\n            <stop offset=\"0\" stopColor=\"#C9E265\" stopOpacity={0.32} />\n            <stop offset=\"1\" stopColor=\"#C9E265\" stopOpacity={0} />\n          </radialGradient>\n        </defs>\n        <rect width=\"200\" height=\"200\" fill={`url(#${id}-ripe)`} />\n        <rect width=\"200\" height=\"200\" fill={`url(#${id}-blush)`} />\n      </g>\n    );\n  }\n  // Strawberry seeds on a staggered grid, leaving the face clear.\n  const seeds: Point[] = [];\n  for (let row = 0, y = bounds.minY + 24; y < bounds.maxY - 8; row++, y += 14) {\n    for (let x = bounds.minX + (row % 2 ? 14 : 7); x < bounds.maxX; x += 14) {\n      if (Math.abs(x - cx) < 34 && Math.abs(y - faceY) < 22) continue;\n      seeds.push([x, y]);\n    }\n  }\n  return (\n    <g clipPath={`url(#${id}-clip)`}>\n      {seeds.map(([x, y]) => (\n        <ellipse key={`${x}-${y}`} cx={x} cy={y} rx={1.8} ry={2.8} fill=\"#FFE7A0\" opacity={0.9} />\n      ))}\n    </g>\n  );\n}\n\n// The leafy crown of a strawberry, or a mango's stem and leaf.\nfunction FruitCrown({ kind, x, y }: { kind: \"strawberry\" | \"mango\"; x: number; y: number }) {\n  if (kind === \"mango\") {\n    return (\n      <g>\n        <path d={`M${x + 1} ${y + 4} q2 -8 6 -13`} fill=\"none\" stroke=\"#6B4423\" strokeWidth={3.5} strokeLinecap=\"round\" />\n        <path d={`M${x + 6} ${y - 9} q15 -12 30 -3 q-15 11 -30 3 Z`} fill=\"#4CAF50\" />\n        <path d={`M${x + 7} ${y - 9} q12 -4 26 -3`} fill=\"none\" stroke=\"#2E7D32\" strokeWidth={1.4} strokeLinecap=\"round\" />\n      </g>\n    );\n  }\n  // Leaves splay out over the shoulders from a short stem.\n  const leaves = [150, 175, 212, 328, 5, 30];\n  return (\n    <g>\n      {leaves.map((deg) => {\n        const radians = (deg * Math.PI) / 180;\n        return (\n          <ellipse\n            key={deg}\n            cx={x + Math.cos(radians) * 16}\n            cy={y + 5 + Math.sin(radians) * 7}\n            rx={16}\n            ry={5.4}\n            fill=\"#3FA34D\"\n            transform={`rotate(${deg} ${x + Math.cos(radians) * 16} ${y + 5 + Math.sin(radians) * 7})`}\n          />\n        );\n      })}\n      <circle cx={x} cy={y + 4} r={6} fill=\"#358A41\" />\n      <path d={`M${x} ${y + 2} q1 -8 4 -13`} fill=\"none\" stroke=\"#358A41\" strokeWidth={4} strokeLinecap=\"round\" />\n    </g>\n  );\n}\n\n// ─── Faces ───────────────────────────────────────────────────────────────────\n\n// The Devsloka logo come alive: its white ring is the eye, the dark centre is the pupil.\nfunction CyclopsEye({\n  eye,\n  state,\n  cheering,\n  glasses,\n  pupilTransform,\n  blinkTransform,\n}: {\n  eye: { x: number; y: number; r: number };\n  state: MascotState;\n  cheering: boolean;\n  glasses: MascotGlasses;\n  pupilTransform: MotionValue<string>;\n  blinkTransform: MotionValue<string>;\n}) {\n  const { x, y, r } = eye;\n  const pupil = r * 0.64;\n  const ink = \"#0B1530\";\n\n  const monocle =\n    glasses === \"none\" ? null : glasses === \"sunglasses\" ? (\n      <g>\n        <circle cx={x} cy={y} r={r + 3} fill=\"#111114\" />\n        <path d={`M${x - r * 0.5} ${y - r * 0.45} l${r * 0.35} 0`} stroke=\"white\" strokeOpacity={0.5} strokeWidth={3} strokeLinecap=\"round\" />\n      </g>\n    ) : (\n      // One eye, so glasses become a monocle on a little chain.\n      <g fill=\"none\" stroke={ink} strokeWidth={3}>\n        <circle cx={x} cy={y} r={r + 3} />\n        <path d={`M${x + (r + 3) * 0.7} ${y + (r + 3) * 0.7} q10 18 -4 34`} strokeWidth={2} strokeLinecap=\"round\" />\n      </g>\n    );\n\n  if (cheering || state === \"sleeping\") {\n    // Happy ^ while celebrating; a closed lid while asleep.\n    const d = cheering\n      ? `M${x - r * 0.62} ${y + r * 0.22} q${r * 0.62} ${-r * 0.95} ${r * 1.24} 0`\n      : `M${x - r * 0.62} ${y} q${r * 0.62} ${r * 0.55} ${r * 1.24} 0`;\n    return (\n      <g>\n        <path d={d} fill=\"none\" stroke=\"white\" strokeWidth={7} strokeLinecap=\"round\" />\n        {monocle}\n      </g>\n    );\n  }\n\n  return (\n    <g>\n      <motion.g style={{ transform: blinkTransform, transformBox: \"fill-box\", transformOrigin: \"center\" }}>\n        <circle cx={x} cy={y} r={r} fill=\"white\" />\n        <motion.g style={{ transform: pupilTransform }}>\n          {/* The logo's pupil: a round centre with a small tail at the bottom right. */}\n          <circle cx={x} cy={y} r={pupil} fill={ink} />\n          <circle cx={x + pupil * 0.62} cy={y + pupil * 0.62} r={pupil * 0.34} fill={ink} />\n          <circle cx={x - pupil * 0.32} cy={y - pupil * 0.38} r={pupil * 0.18} fill=\"white\" opacity={0.9} />\n        </motion.g>\n      </motion.g>\n      {monocle}\n    </g>\n  );\n}\n\nfunction Eyes({\n  left,\n  right,\n  y,\n  state,\n  cheering,\n  color,\n  pill,\n}: {\n  left: number;\n  right: number;\n  y: number;\n  state: MascotState;\n  cheering: boolean;\n  color: string;\n  pill: boolean;\n}) {\n  // Happy ^ ^ while celebrating; closed arcs while asleep.\n  if (cheering || state === \"sleeping\") {\n    const arc = cheering ? \"q9.5 -11 19 0\" : \"q9.5 8 19 0\";\n    return (\n      <g fill=\"none\" stroke={color} strokeWidth={4} strokeLinecap=\"round\">\n        <path d={`M${left - 9.5} ${y + (cheering ? 4 : 0)} ${arc}`} />\n        <path d={`M${right - 9.5} ${y + (cheering ? 4 : 0)} ${arc}`} />\n      </g>\n    );\n  }\n  return (\n    <g>\n      {[left, right].map((x) =>\n        pill ? (\n          <rect key={x} x={x - 4.5} y={y - (state === \"working\" ? 6 : 10)} width={9} height={state === \"working\" ? 12 : 20} rx={4.5} fill={color} />\n        ) : (\n          <g key={x}>\n            <ellipse cx={x} cy={y} rx={10} ry={state === \"working\" ? 10 : 14.5} fill={color} />\n            <circle cx={x + 3} cy={y - 5} r={2.8} fill=\"white\" opacity={0.85} />\n          </g>\n        )\n      )}\n    </g>\n  );\n}\n\nfunction BotFace({\n  id,\n  geometry,\n  state,\n  cheering,\n  showAntenna,\n  visorTransform,\n  pupilTransform,\n  blinkTransform,\n  antennaTransform,\n}: {\n  id: string;\n  geometry: Geometry;\n  state: MascotState;\n  cheering: boolean;\n  showAntenna: boolean;\n  visorTransform: MotionValue<string>;\n  pupilTransform: MotionValue<string>;\n  blinkTransform: MotionValue<string>;\n  antennaTransform: MotionValue<string>;\n}) {\n  const { cx, faceY: y, top } = geometry;\n  const ink = \"#111111\";\n  const eyes = [cx - 38, cx - 10];\n  return (\n    <g>\n      <defs>\n        <clipPath id={`${id}-face-clip`}>\n          <path d={geometry.path} />\n        </clipPath>\n      </defs>\n      {showAntenna && (\n        <motion.g style={{ transform: antennaTransform, transformOrigin: `${cx + 10}px ${top + 4}px`, transformBox: \"view-box\" }}>\n          <path d={`M${cx + 10} ${top + 4} L${cx + 26} ${top - 24}`} stroke={ink} strokeWidth={5} strokeLinecap=\"round\" />\n          <circle cx={cx + 28} cy={top - 27} r={7.5} fill={ink} />\n        </motion.g>\n      )}\n      {/* The visor slides toward the pointer and is clipped by the round head. */}\n      <g clipPath={`url(#${id}-face-clip)`}>\n        <motion.g style={{ transform: visorTransform }}>\n          <rect x={cx - 66} y={y - 26} width={110} height={52} rx={26} fill=\"white\" />\n          <motion.g style={{ transform: pupilTransform }}>\n            {cheering || state === \"sleeping\" ? (\n              <g fill=\"none\" stroke={ink} strokeWidth={4} strokeLinecap=\"round\">\n                {eyes.map((x) => (\n                  <path key={x} d={cheering ? `M${x - 8} ${y + 3} q8 -10 16 0` : `M${x - 8} ${y} q8 7 16 0`} />\n                ))}\n              </g>\n            ) : (\n              <motion.g style={{ transform: blinkTransform, transformBox: \"fill-box\", transformOrigin: \"center\" }}>\n                {eyes.map((x) => (\n                  <ellipse key={x} cx={x} cy={y} rx={8} ry={state === \"working\" ? 5 : 9} fill={ink} />\n                ))}\n              </motion.g>\n            )}\n            {/* A little cheek line, like a smile seen side-on. */}\n            <path d={`M${cx + 14} ${y - 12} q8 12 0 24`} fill=\"none\" stroke={ink} strokeWidth={4} strokeLinecap=\"round\" />\n          </motion.g>\n        </motion.g>\n      </g>\n    </g>\n  );\n}\n\n// A small burst of sparkles when the mascot is clicked. Re-mounted per click.\nfunction Sparkles({ color, size }: { color: string; size: number }) {\n  const sparks = [-150, -115, -80, -45, -10, 25];\n  return (\n    <div aria-hidden className=\"pointer-events-none absolute inset-0 z-10\">\n      {sparks.map((deg, i) => {\n        const radians = (deg * Math.PI) / 180;\n        const distance = size * (0.42 + (i % 2) * 0.12);\n        return (\n          <motion.svg\n            key={deg}\n            viewBox=\"0 0 20 20\"\n            className=\"absolute top-[30%] left-1/2 size-4\"\n            style={{ marginLeft: -8, marginTop: -8, color: i % 2 ? \"#FFD23F\" : color }}\n            initial={{ opacity: 1, transform: \"translate(0px, 0px) scale(0.4) rotate(0deg)\" }}\n            animate={{\n              opacity: 0,\n              transform: `translate(${Math.cos(radians) * distance}px, ${Math.sin(radians) * distance}px) scale(1) rotate(90deg)`,\n            }}\n            transition={{ duration: 0.8, ease: [0.23, 1, 0.32, 1], delay: 0.15 }}\n          >\n            <path d=\"M10 0 C11 7 13 9 20 10 C13 11 11 13 10 20 C9 13 7 11 0 10 C7 9 9 7 10 0 Z\" fill=\"currentColor\" />\n          </motion.svg>\n        );\n      })}\n    </div>\n  );\n}\n\n// ─── Accessories ─────────────────────────────────────────────────────────────\n\nfunction Hat({ kind, x, y }: { kind: MascotHat; x: number; y: number }) {\n  if (kind === \"none\") return null;\n  // Hats sit on the top of the head with a jaunty tilt.\n  const place = `translate(${x + 4} ${y + 6}) rotate(-10)`;\n  switch (kind) {\n    case \"party\":\n      return (\n        <g transform={place}>\n          <path d=\"M-20 0 L4 -50 L22 0 Z\" fill=\"#FFD23F\" />\n          <path d=\"M-12 -16 L13 -16 M-6 -30 L9 -30\" stroke=\"#FF5C8A\" strokeWidth={5} strokeLinecap=\"round\" />\n          <circle cx={4} cy={-52} r={6} fill=\"#FF5C8A\" />\n        </g>\n      );\n    case \"beanie\":\n      return (\n        <g transform={place}>\n          <path d=\"M-27 -2 C-27 -34 27 -34 27 -2 Z\" fill=\"#E4572E\" />\n          <rect x={-30} y={-8} width={60} height={11} rx={5} fill=\"#C8432A\" />\n          <circle cx={0} cy={-31} r={7} fill=\"#F3F0E8\" />\n        </g>\n      );\n    case \"wizard\":\n      return (\n        <g transform={place}>\n          <path d=\"M-22 0 Q-4 -40 14 -62 Q8 -30 24 0 Z\" fill=\"#5B4BDB\" />\n          <ellipse cx={1} cy={0} rx={34} ry={7} fill=\"#4535BF\" />\n          <path d=\"M3 -24 l2.4 5 5.4 .6 -4 3.7 1.1 5.3 -4.9 -2.7 -4.9 2.7 1.1 -5.3 -4 -3.7 5.4 -.6 Z\" fill=\"#FFD23F\" />\n        </g>\n      );\n    case \"tophat\":\n      return (\n        <g transform={place}>\n          <rect x={-17} y={-40} width={34} height={38} rx={4} fill=\"#1F1F24\" />\n          <rect x={-17} y={-14} width={34} height={7} fill=\"#0A6EFF\" />\n          <ellipse cx={0} cy={-1} rx={30} ry={6} fill=\"#1F1F24\" />\n        </g>\n      );\n  }\n}\n\nfunction Glasses({ kind, left, right, y }: { kind: MascotGlasses; left: number; right: number; y: number }) {\n  if (kind === \"none\") return null;\n  const stroke = { stroke: \"#1d1b2e\", strokeWidth: 3.2, strokeLinecap: \"round\" as const };\n  const bridge = <path d={`M${left + 15} ${y - 2} Q${(left + right) / 2} ${y - 7} ${right - 15} ${y - 2}`} fill=\"none\" {...stroke} />;\n  switch (kind) {\n    case \"round\":\n      return (\n        <g>\n          <circle cx={left} cy={y} r={16} fill=\"white\" fillOpacity={0.12} {...stroke} />\n          <circle cx={right} cy={y} r={16} fill=\"white\" fillOpacity={0.12} {...stroke} />\n          {bridge}\n        </g>\n      );\n    case \"square\":\n      return (\n        <g>\n          <rect x={left - 16} y={y - 14} width={32} height={28} rx={7} fill=\"white\" fillOpacity={0.12} {...stroke} />\n          <rect x={right - 16} y={y - 14} width={32} height={28} rx={7} fill=\"white\" fillOpacity={0.12} {...stroke} />\n          {bridge}\n        </g>\n      );\n    case \"sunglasses\":\n      return (\n        <g>\n          <rect x={left - 17} y={y - 13} width={34} height={24} rx={9} fill=\"#111114\" {...stroke} />\n          <rect x={right - 17} y={y - 13} width={34} height={24} rx={9} fill=\"#111114\" {...stroke} />\n          {bridge}\n          <path d={`M${left - 9} ${y - 5} l7 0 M${right - 9} ${y - 5} l7 0`} stroke=\"white\" strokeOpacity={0.5} strokeWidth={2} strokeLinecap=\"round\" />\n        </g>\n      );\n  }\n}\n"
    }
  ],
  "dependencies": [
    "motion"
  ]
}
