{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"glint-bot","type":"registry:ui","title":"Glint Bot","description":"A retro robot with a lit CSS-3D visor head that turns toward your cursor, spinning reel eyes and jointed arms. It blinks, smiles when booped, blushes when petted and gets dizzy if you poke it too much.","dependencies":[],"registryDependencies":[],"files":[{"path":"registry/ui/glint-bot.tsx","type":"registry:ui","content":"\"use client\";\n\nimport { useEffect, useRef, useState, type CSSProperties, type KeyboardEvent, type PointerEvent } from \"react\";\n\nexport interface GlintBotProps {\n  /** Overall size in px (the bot fits a size x size box). */\n  size?: number;\n  /** Head shell color. */\n  color?: string;\n  /** Band around the top of the head. */\n  accent?: string;\n  /** Visor glass color. */\n  screen?: string;\n  /** Lens and grille glow color. */\n  ink?: string;\n  /** Turn the head toward the pointer. */\n  followCursor?: boolean;\n  /** Raise the right arm and wave. */\n  wave?: boolean;\n  /** Blink, react to clicks, blush when petted, get dizzy when poked. */\n  interactive?: boolean;\n  label?: string;\n  className?: string;\n}\n\ntype Mood = \"idle\" | \"happy\" | \"love\" | \"dizzy\";\n\n// Face normals in CSS space (x right, y down, z toward the viewer).\nconst FACES = [\n  { key: \"front\", n: [0, 0, 1] },\n  { key: \"back\", n: [0, 0, -1] },\n  { key: \"right\", n: [1, 0, 0] },\n  { key: \"left\", n: [-1, 0, 0] },\n  { key: \"top\", n: [0, -1, 0] },\n  { key: \"bottom\", n: [0, 1, 0] },\n] as const;\n\n// Key light from the upper left, slightly in front.\nconst L = (() => {\n  const v = [-0.45, -0.75, 0.55];\n  const m = Math.hypot(...v);\n  return v.map((x) => x / m);\n})();\n\nconst NOISE =\n  \"url(\\\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E\\\")\";\n\nconst css = `\n@keyframes glint-bot-float{0%,100%{transform:translateY(0)}50%{transform:translateY(-2.5%)}}\n@keyframes glint-bot-wobble{0%,100%{transform:rotate(0)}25%{transform:rotate(-7deg)}75%{transform:rotate(7deg)}}\n@keyframes glint-bot-wave{0%,100%{transform:rotate(-12deg)}50%{transform:rotate(22deg)}}\n@keyframes glint-bot-reel{to{transform:rotate(360deg)}}\n@media (prefers-reduced-motion:reduce){.glint-bot-anim{animation:none!important}}\n`;\n\n// Body art lives in a 100x100 box that maps onto the component's size x size square.\nconst HEAD = { w: 46, h: 29, d: 30, top: 6 }; // percent of size\n\nexport function GlintBot({\n  size = 280,\n  color = \"#b5e61d\",\n  accent = \"#f4b860\",\n  screen = \"#141a0f\",\n  ink = \"#d9ff6b\",\n  followCursor = true,\n  wave = false,\n  interactive = true,\n  label = \"Glint Bot\",\n  className,\n}: GlintBotProps) {\n  const rootRef = useRef<HTMLButtonElement>(null);\n  const squashRef = useRef<HTMLDivElement>(null);\n  const headRef = useRef<HTMLDivElement>(null);\n  const shadeRefs = useRef<(HTMLDivElement | null)[]>([]);\n  const shineRef = useRef<HTMLDivElement>(null);\n  const eyesRef = useRef<SVGGElement>(null);\n  const [mood, setMood] = useState<Mood>(\"idle\");\n  const [blink, setBlink] = useState(false);\n  const moodTimer = useRef<number | undefined>(undefined);\n  const taps = useRef<number[]>([]);\n  const pat = useRef<{ x: number; dir: number; turns: number; t0: number } | null>(null);\n\n  const W = (size * HEAD.w) / 100;\n  const H = (size * HEAD.h) / 100;\n  const D = (size * HEAD.d) / 100;\n\n  // Head follows the pointer; lighting is recomputed from the rotated face normals.\n  useEffect(() => {\n    const root = rootRef.current!;\n    const reduced = matchMedia(\"(prefers-reduced-motion: reduce)\").matches;\n    // Resting 3/4 pose shows the top and one side, so it reads as 3D before the pointer moves.\n    const BASE = { x: -16, y: -8 };\n    const target = { ...BASE };\n    const cur = { ...BASE };\n    let raf = 0;\n    let lastMove = 0;\n    let idleTimer = 0;\n\n    const apply = () => {\n      // A frame can still fire after unmount or a remount; bail out if the head is gone.\n      const head = headRef.current;\n      if (!head) return;\n      const ry = (cur.x * Math.PI) / 180;\n      const rx = (cur.y * Math.PI) / 180;\n      head.style.transform = `rotateX(${cur.y}deg) rotateY(${cur.x}deg)`;\n      const [cy, sy, cx, sx] = [Math.cos(ry), Math.sin(ry), Math.cos(rx), Math.sin(rx)];\n      FACES.forEach((f, i) => {\n        const [x, y, z] = f.n;\n        const x1 = x * cy + z * sy;\n        const z1 = -x * sy + z * cy;\n        const y2 = y * cx - z1 * sx;\n        const z2 = y * sx + z1 * cx;\n        const b = x1 * L[0] + y2 * L[1] + z2 * L[2];\n        const el = shadeRefs.current[i];\n        if (el) el.style.background = b > 0.55 ? `rgba(255,255,255,${(b - 0.55) * 0.55})` : `rgba(0,0,0,${Math.min(0.62, (0.55 - b) * 0.7)})`;\n      });\n      if (shineRef.current) shineRef.current.style.transform = `translate(${-cur.x * 0.6}%, ${-cur.y * 0.6}%)`;\n      eyesRef.current?.setAttribute(\"transform\", `translate(${cur.x * 0.12} ${-cur.y * 0.14})`);\n    };\n\n    const tick = () => {\n      cur.x += (target.x - cur.x) * 0.12;\n      cur.y += (target.y - cur.y) * 0.12;\n      apply();\n      raf = Math.abs(target.x - cur.x) + Math.abs(target.y - cur.y) > 0.05 ? requestAnimationFrame(tick) : 0;\n    };\n    const go = () => {\n      if (!raf) raf = requestAnimationFrame(tick);\n    };\n\n    const onMove = (e: globalThis.PointerEvent) => {\n      const r = root.getBoundingClientRect();\n      const dx = (e.clientX - (r.left + r.width / 2)) / 260;\n      const dy = (e.clientY - (r.top + r.height * 0.22)) / 260;\n      target.x = BASE.x * 0.4 + Math.max(-1, Math.min(1, dx)) * 30;\n      target.y = BASE.y * 0.5 - Math.max(-1, Math.min(1, dy)) * 16;\n      lastMove = performance.now();\n      go();\n    };\n\n    // When the pointer goes quiet, glance around on its own.\n    const glance = () => {\n      if (performance.now() - lastMove > 3000) {\n        target.x = BASE.x + (Math.random() - 0.5) * 30;\n        target.y = BASE.y + (Math.random() - 0.5) * 12;\n        go();\n      }\n      idleTimer = window.setTimeout(glance, 1800 + Math.random() * 2200);\n    };\n\n    apply();\n    if (followCursor && !reduced) {\n      window.addEventListener(\"pointermove\", onMove, { passive: true });\n      idleTimer = window.setTimeout(glance, 2500);\n    }\n    return () => {\n      cancelAnimationFrame(raf);\n      clearTimeout(idleTimer);\n      window.removeEventListener(\"pointermove\", onMove);\n    };\n  }, [followCursor]);\n\n  // Blinking: the visor lids drop over the lenses.\n  useEffect(() => {\n    if (!interactive) return;\n    let t = 0;\n    const loop = () => {\n      t = window.setTimeout(() => {\n        setBlink(true);\n        window.setTimeout(() => setBlink(false), 140);\n        loop();\n      }, 1800 + Math.random() * 3200);\n    };\n    loop();\n    return () => clearTimeout(t);\n  }, [interactive]);\n\n  useEffect(() => () => clearTimeout(moodTimer.current), []);\n\n  const react = (m: Mood, ms: number) => {\n    setMood(m);\n    clearTimeout(moodTimer.current);\n    moodTimer.current = window.setTimeout(() => setMood(\"idle\"), ms);\n  };\n\n  const squash = () =>\n    squashRef.current?.animate(\n      [\n        { transform: \"scale(1,1)\" },\n        { transform: \"scale(1.08,0.9)\", offset: 0.2 },\n        { transform: \"scale(0.96,1.05)\", offset: 0.5 },\n        { transform: \"scale(1.02,0.99)\", offset: 0.75 },\n        { transform: \"scale(1,1)\" },\n      ],\n      { duration: 480, easing: \"ease-out\" },\n    );\n\n  const poke = () => {\n    if (!interactive) return;\n    squash();\n    const now = performance.now();\n    taps.current = [...taps.current.filter((t) => now - t < 2000), now];\n    if (taps.current.length >= 5) {\n      taps.current = [];\n      react(\"dizzy\", 2200);\n    } else if (mood !== \"dizzy\") react(\"happy\", 900);\n  };\n\n  const onDown = (e: PointerEvent<HTMLButtonElement>) => {\n    pat.current = { x: e.clientX, dir: 0, turns: 0, t0: performance.now() };\n  };\n  // Petting: dragging side to side while pressed.\n  const onDrag = (e: PointerEvent<HTMLButtonElement>) => {\n    const p = pat.current;\n    if (!p || !interactive || e.buttons === 0) return;\n    const dx = e.clientX - p.x;\n    if (Math.abs(dx) < 12) return;\n    const dir = Math.sign(dx);\n    if (p.dir && dir !== p.dir) p.turns++;\n    p.dir = dir;\n    p.x = e.clientX;\n    if (p.turns >= 3 && performance.now() - p.t0 < 1500) {\n      pat.current = null;\n      react(\"love\", 2600);\n    }\n  };\n\n  const onKey = (e: KeyboardEvent<HTMLButtonElement>) => {\n    if (e.key === \"Enter\" || e.key === \" \") {\n      e.preventDefault();\n      poke();\n    }\n  };\n\n  // ---- Head (a real CSS-3D box) ----\n\n  const faceBox = (key: (typeof FACES)[number][\"key\"]) => {\n    const half = { x: W / 2, y: H / 2, z: D / 2 };\n    switch (key) {\n      case \"front\":\n        return { w: W, h: H, t: `translateZ(${half.z}px)` };\n      case \"back\":\n        return { w: W, h: H, t: `rotateY(180deg) translateZ(${half.z}px)` };\n      case \"right\":\n        return { w: D, h: H, t: `rotateY(90deg) translateZ(${half.x}px)` };\n      case \"left\":\n        return { w: D, h: H, t: `rotateY(-90deg) translateZ(${half.x}px)` };\n      case \"top\":\n        return { w: W, h: D, t: `rotateX(90deg) translateZ(${half.y}px)` };\n      case \"bottom\":\n        return { w: W, h: D, t: `rotateX(-90deg) translateZ(${half.y}px)` };\n    }\n  };\n\n  const renderVisor = () => {\n    const lens = (cx: number) => {\n      const reel =\n        mood === \"happy\" ? (\n          <path d={`M${cx - 9} ${31} Q${cx} ${20} ${cx + 9} ${31}`} stroke={ink} strokeWidth={4} fill=\"none\" strokeLinecap=\"round\" />\n        ) : mood === \"love\" ? (\n          <path transform={`translate(${cx} 29) scale(0.95)`} d=\"M0 9 C-14 0 -9 -11 0 -4 C9 -11 14 0 0 9Z\" fill=\"#ff5c8a\" />\n        ) : (\n          <g\n            className=\"glint-bot-anim\"\n            style={{\n              transformBox: \"fill-box\",\n              transformOrigin: \"center\",\n              animation: `glint-bot-reel ${mood === \"dizzy\" ? 0.35 : 6}s linear infinite`,\n            }}\n          >\n            <circle cx={cx} cy={28} r={11} fill={ink} opacity={0.9} />\n            {[0, 120, 240].map((deg) => (\n              <circle\n                key={deg}\n                cx={cx + Math.cos((deg * Math.PI) / 180) * 6}\n                cy={28 + Math.sin((deg * Math.PI) / 180) * 6}\n                r={3}\n                fill={screen}\n              />\n            ))}\n            <circle cx={cx} cy={28} r={2.2} fill={screen} />\n          </g>\n        );\n      return (\n        <g key={cx}>\n          <circle cx={cx} cy={28} r={17} fill=\"#0b0f08\" stroke=\"#cfd3c5\" strokeWidth={2.5} />\n          <circle cx={cx} cy={28} r={13.5} fill=\"none\" stroke={ink} strokeOpacity={0.18} strokeWidth={1} />\n          {reel}\n          {/* Lid for blinking */}\n          <rect\n            x={cx - 17}\n            y={11}\n            width={34}\n            height={34}\n            fill={screen}\n            style={{\n              transformBox: \"fill-box\",\n              transformOrigin: \"top\",\n              transform: `scaleY(${blink && mood === \"idle\" ? 1 : 0})`,\n              transition: \"transform 90ms\",\n            }}\n          />\n        </g>\n      );\n    };\n    // Speaker grille: dots that curve into a smile when happy.\n    const dots = [0, 1, 2, 3, 4].map((i) => {\n      const x = 44 + i * 8;\n      const lift = mood === \"happy\" || mood === \"love\" ? [0, 2.5, 3.5, 2.5, 0][i] : mood === \"dizzy\" ? [1, -1, 1, -1, 1][i] : 0;\n      return <circle key={i} cx={x} cy={52 + lift} r={2.4} fill={ink} opacity={mood === \"idle\" ? 0.55 : 0.95} />;\n    });\n\n    return (\n      <div\n        style={{\n          position: \"absolute\",\n          left: \"8%\",\n          right: \"8%\",\n          top: \"16%\",\n          bottom: \"12%\",\n          background: `linear-gradient(180deg, color-mix(in oklab, ${screen} 80%, white), ${screen} 45%)`,\n          borderRadius: W * 0.08,\n          boxShadow: `inset 0 ${W * 0.02}px ${W * 0.05}px rgba(0,0,0,.55), 0 0 0 ${W * 0.012}px rgba(0,0,0,.35)`,\n          overflow: \"hidden\",\n        }}\n      >\n        <svg viewBox=\"0 0 120 62\" preserveAspectRatio=\"xMidYMid meet\" style={{ width: \"100%\", height: \"100%\" }} aria-hidden>\n          <g ref={eyesRef}>\n            {lens(38)}\n            {lens(82)}\n            {dots}\n            <g opacity={mood === \"love\" || mood === \"happy\" ? 0.6 : 0} style={{ transition: \"opacity .3s\" }}>\n              <ellipse cx={14} cy={44} rx={7} ry={3.5} fill=\"#ff7aa2\" />\n              <ellipse cx={106} cy={44} rx={7} ry={3.5} fill=\"#ff7aa2\" />\n            </g>\n          </g>\n        </svg>\n        {/* Glass reflection */}\n        <div\n          style={{\n            position: \"absolute\",\n            inset: 0,\n            background: \"linear-gradient(115deg, rgba(255,255,255,.22) 0 18%, transparent 30% 100%)\",\n            pointerEvents: \"none\",\n          }}\n        />\n      </div>\n    );\n  };\n\n  const face = (i: number, f: (typeof FACES)[number]) => {\n    const box = faceBox(f.key);\n    const style: CSSProperties = {\n      position: \"absolute\",\n      left: (W - box.w) / 2,\n      top: (H - box.h) / 2,\n      width: box.w,\n      height: box.h,\n      transform: box.t,\n      background: color,\n      backfaceVisibility: \"hidden\",\n      borderRadius: Math.min(box.w, box.h) * 0.14,\n      boxShadow: `inset 0 0 0 ${size * 0.006}px rgba(255,255,255,.3), inset 0 ${-size * 0.012}px ${size * 0.03}px rgba(0,0,0,.18)`,\n      overflow: \"hidden\",\n    };\n    const banded = f.key !== \"top\" && f.key !== \"bottom\";\n    return (\n      <div key={f.key} style={style}>\n        {banded && <div style={{ position: \"absolute\", left: 0, right: 0, top: \"6%\", height: \"7%\", background: accent }} />}\n        <div style={{ position: \"absolute\", inset: 0, backgroundImage: NOISE, opacity: 0.12, mixBlendMode: \"overlay\" }} />\n        <div ref={(el) => void (shadeRefs.current[i] = el)} style={{ position: \"absolute\", inset: 0 }} />\n        {/* The visor emits its own light, so it sits above the face shading. */}\n        {f.key === \"front\" && renderVisor()}\n        {f.key === \"front\" && (\n          <div\n            ref={shineRef}\n            style={{\n              position: \"absolute\",\n              inset: \"-30%\",\n              background: \"radial-gradient(circle at 28% 22%, rgba(255,255,255,.35), transparent 32%)\",\n              pointerEvents: \"none\",\n            }}\n          />\n        )}\n      </div>\n    );\n  };\n\n  // ---- Body (SVG in a 100x100 box) ----\n\n  const arm = (side: 1 | -1, raised: boolean) => {\n    // side: -1 = left (viewer's left), 1 = right\n    const sx = 50 + side * 15;\n    const sy = 55;\n    const limb = (x1: number, y1: number, x2: number, y2: number) => (\n      <>\n        <line x1={x1} y1={y1} x2={x2} y2={y2} stroke=\"url(#glint-bot-limb)\" strokeWidth={5.2} strokeLinecap=\"round\" />\n        <line x1={x1} y1={y1} x2={x2} y2={y2} stroke=\"rgba(255,255,255,.55)\" strokeWidth={1.2} strokeLinecap=\"round\" transform=\"translate(-0.8 -0.8)\" />\n      </>\n    );\n    const joint = (x: number, y: number, r = 2.6) => (\n      <>\n        <circle cx={x} cy={y} r={r} fill=\"#6b7063\" />\n        <circle cx={x - r * 0.3} cy={y - r * 0.3} r={r * 0.45} fill=\"rgba(255,255,255,.35)\" />\n      </>\n    );\n    const claw = (x: number, y: number, rot: number) => (\n      <g transform={`translate(${x} ${y}) rotate(${rot})`}>\n        <rect x={-2.8} y={-1.5} width={5.6} height={4.5} rx={1.6} fill=\"#7c8174\" />\n        <rect x={-3} y={2.4} width={2} height={3.2} rx={1} fill=\"#5c6056\" />\n        <rect x={1} y={2.4} width={2} height={3.2} rx={1} fill=\"#5c6056\" />\n      </g>\n    );\n\n    if (raised) {\n      // Upper arm out and up; forearm waves around the elbow.\n      const ex = sx + side * 10;\n      const ey = sy - 7;\n      return (\n        <g key=\"raised\">\n          {limb(sx, sy, ex, ey)}\n          <g\n            className=\"glint-bot-anim\"\n            style={{ transformBox: \"view-box\", transformOrigin: `${ex}px ${ey}px`, animation: \"glint-bot-wave 1s ease-in-out infinite\" }}\n          >\n            {limb(ex, ey, ex + side * 2, ey - 14)}\n            {claw(ex + side * 2, ey - 16, 180)}\n          </g>\n          {joint(ex, ey)}\n          {joint(sx, sy, 3.6)}\n        </g>\n      );\n    }\n    // Hands on hips.\n    const ex = sx + side * 10;\n    const ey = sy + 10;\n    const hx = sx + side * 2;\n    const hy = sy + 21;\n    return (\n      <g key={`hip-${side}`}>\n        {limb(sx, sy, ex, ey)}\n        {limb(ex, ey, hx, hy)}\n        {joint(ex, ey)}\n        {claw(hx, hy, side * 70)}\n        {joint(sx, sy, 3.6)}\n      </g>\n    );\n  };\n\n  const body = (\n    <svg viewBox=\"0 0 100 100\" overflow=\"visible\" style={{ position: \"absolute\", inset: 0, width: \"100%\", height: \"100%\" }}>\n      <defs>\n        <linearGradient id=\"glint-bot-shell\" x1=\"0\" y1=\"0\" x2=\"1\" y2=\"0\">\n          <stop offset=\"0\" stopColor=\"#fdfdf8\" />\n          <stop offset=\"0.45\" stopColor=\"#f1f0e8\" />\n          <stop offset=\"1\" stopColor=\"#b9b6a8\" />\n        </linearGradient>\n        <linearGradient id=\"glint-bot-limb\" x1=\"0\" y1=\"0\" x2=\"1\" y2=\"1\">\n          <stop offset=\"0\" stopColor=\"#f7f6ef\" />\n          <stop offset=\"1\" stopColor=\"#b8b5a7\" />\n        </linearGradient>\n        <linearGradient id=\"glint-bot-coil\" x1=\"0\" y1=\"0\" x2=\"1\" y2=\"0\">\n          <stop offset=\"0\" stopColor=\"#9a9e92\" />\n          <stop offset=\"0.5\" stopColor=\"#e8e8e0\" />\n          <stop offset=\"1\" stopColor=\"#6f7368\" />\n        </linearGradient>\n      </defs>\n\n      {/* Ground shadow */}\n      <ellipse cx={50} cy={95} rx={22} ry={3} fill=\"rgba(0,0,0,.35)\" style={{ filter: \"blur(1.5px)\" }} />\n\n      {/* Back arm (left), then torso, then front arm (right) */}\n      {arm(-1, false)}\n\n      {/* Torso: capsule that flares into a skirt with fins */}\n      <path\n        d=\"M38 56 C38 48.5 43 46.5 50 46.5 C57 46.5 62 48.5 62 56 L64.5 77 C70 79 72.5 83 72.5 92 L27.5 92 C27.5 83 30 79 35.5 77 Z\"\n        fill=\"url(#glint-bot-shell)\"\n        stroke=\"rgba(0,0,0,.18)\"\n        strokeWidth={0.6}\n      />\n      {/* Lime side stripe and base band */}\n      <path d=\"M40.5 57 C40.5 52 42 50 44 49.5 L44.5 76 L39 78 Z\" fill={color} opacity={0.9} />\n      <path d=\"M29.5 86 L70.5 86 L72.5 92 L27.5 92 Z\" fill={color} />\n      <path d=\"M29.5 86 L70.5 86 L71 87.4 L29 87.4 Z\" fill=\"rgba(255,255,255,.4)\" />\n      {/* Fin gaps */}\n      <rect x={36} y={80} width={1.6} height={12} rx={0.8} fill=\"rgba(0,0,0,.18)\" />\n      <rect x={62.4} y={80} width={1.6} height={12} rx={0.8} fill=\"rgba(0,0,0,.18)\" />\n      {/* Chest spark emblem */}\n      <g transform=\"translate(53 60) scale(0.5)\">\n        <circle r={7} fill=\"none\" stroke={color} strokeWidth={1.8} />\n        <path d=\"M0 -5 L1.3 -1.3 L5 0 L1.3 1.3 L0 5 L-1.3 1.3 L-5 0 L-1.3 -1.3 Z\" fill={color} />\n      </g>\n      {/* Control panel */}\n      <rect x={45} y={68} width={16} height={5} rx={1.2} fill=\"#2a2e25\" />\n      <circle cx={48} cy={70.5} r={0.9} fill={ink} />\n      <circle cx={51} cy={70.5} r={0.9} fill={ink} opacity={0.5} />\n      <rect x={53.5} y={69.8} width={5.5} height={1.4} rx={0.7} fill=\"#6b7063\" />\n      <rect x={45} y={74.5} width={16} height={1.2} rx={0.6} fill=\"#2a2e25\" opacity={0.6} />\n\n      {arm(1, wave)}\n\n      {/* Coil-spring neck */}\n      {[0, 1, 2, 3, 4].map((i) => (\n        <ellipse key={i} cx={50} cy={36.8 + i * 2.4} rx={5.5 - i * 0.2} ry={1.4} fill=\"none\" stroke=\"url(#glint-bot-coil)\" strokeWidth={1.4} />\n      ))}\n    </svg>\n  );\n\n  return (\n    <button\n      ref={rootRef}\n      type=\"button\"\n      aria-label={`${label}. Press to boop.`}\n      onClick={poke}\n      onKeyDown={onKey}\n      onPointerDown={onDown}\n      onPointerMove={onDrag}\n      className={className}\n      style={{\n        position: \"relative\",\n        width: size,\n        height: size,\n        background: \"none\",\n        border: 0,\n        padding: 0,\n        cursor: interactive ? \"pointer\" : \"default\",\n        touchAction: \"none\",\n        WebkitTapHighlightColor: \"transparent\",\n      }}\n    >\n      <style href=\"glint-bot\" precedence=\"default\">\n        {css}\n      </style>\n      <div ref={squashRef} aria-hidden style={{ position: \"absolute\", inset: 0, transformOrigin: \"50% 94%\" }}>\n        {body}\n        {/* Head */}\n        <div\n          className=\"glint-bot-anim\"\n          style={{\n            position: \"absolute\",\n            left: (size - W) / 2,\n            top: (size * HEAD.top) / 100,\n            width: W,\n            height: H,\n            animation: mood === \"dizzy\" ? \"glint-bot-wobble .5s ease-in-out infinite\" : \"glint-bot-float 3.2s ease-in-out infinite\",\n            // Perspective must sit on the rotating head's direct parent, or the 3D gets flattened.\n            perspective: size * 1.9,\n          }}\n        >\n          <div ref={headRef} style={{ position: \"absolute\", inset: 0, transformStyle: \"preserve-3d\" }}>\n            {FACES.map((f, i) => face(i, f))}\n          </div>\n        </div>\n      </div>\n    </button>\n  );\n}\n"}]}