{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "carousel-ring-3d",
  "type": "registry:component",
  "title": "Carousel Ring 3D",
  "description": "Cards standing on a circular orbit in real CSS perspective. Drag or swipe with inertia and snap, use the arrow keys or the buttons, or let it autoplay.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "hud",
    "carousel",
    "3d",
    "ring",
    "orbit",
    "slider",
    "hud"
  ],
  "docs": "https://hyperblur.dev/effects/carousel-ring-3d",
  "files": [
    {
      "path": "registry/hyperblur/carousel-ring-3d.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/carousel-ring-3d.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport interface CarouselRing3dItem {\n  id: string;\n  title: string;\n  kicker?: string;\n  text?: string;\n  tag?: string;\n}\n\nexport interface CarouselRing3dProps extends Omit<React.HTMLAttributes<HTMLDivElement>, \"onChange\"> {\n  items?: CarouselRing3dItem[];\n  index?: number;\n  defaultIndex?: number;\n  onActiveChange?: (index: number, item: CarouselRing3dItem) => void;\n  autoplay?: number;\n  height?: number;\n  spread?: number;\n  accent?: string;\n  label?: string;\n  showControls?: boolean;\n}\n\nconst defaultItems: CarouselRing3dItem[] = [\n  { id: \"ion-drift\", kicker: \"EXP 014\", title: \"Ion Drift\", text: \"Charged particles bending around the cursor in a slow magnetic field.\", tag: \"WEBGL\" },\n  { id: \"parallax-atlas\", kicker: \"EXP 021\", title: \"Parallax Atlas\", text: \"A folded paper map that opens in layered depth as you scroll.\", tag: \"CSS 3D\" },\n  { id: \"signal-garden\", kicker: \"EXP 027\", title: \"Signal Garden\", text: \"Audio-reactive stems that sway with the room microphone.\", tag: \"AUDIO\" },\n  { id: \"night-grid\", kicker: \"EXP 033\", title: \"Night Grid\", text: \"An endless synth horizon drawn with a single fragment shader.\", tag: \"SHADER\" },\n  { id: \"orbital-type\", kicker: \"EXP 038\", title: \"Orbital Type\", text: \"Letters circling a baseline that tilts with device motion.\", tag: \"TYPE\" },\n  { id: \"pulse-lattice\", kicker: \"EXP 042\", title: \"Pulse Lattice\", text: \"A spring mesh that ripples outward from every click.\", tag: \"PHYSICS\" },\n  { id: \"echo-room\", kicker: \"EXP 047\", title: \"Echo Room\", text: \"Footsteps rendered as fading rings across a dark floor plan.\", tag: \"CANVAS\" },\n];\n\nconst css = `\n.hb-ua1 {\n  --hb-ua1-accent: #ff4d4d;\n  position: relative;\n  box-sizing: border-box;\n  display: flex;\n  flex-direction: column;\n  width: 100%;\n  font-family: inherit;\n  color: #ededed;\n  outline: none;\n  user-select: none;\n  -webkit-user-select: none;\n}\n.hb-ua1 *, .hb-ua1 *::before, .hb-ua1 *::after { box-sizing: border-box; }\n.hb-ua1:focus-visible .hb-ua1-stage { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--hb-ua1-accent) 60%, transparent); }\n.hb-ua1-stage {\n  position: relative;\n  flex: 1 1 auto;\n  min-height: 0;\n  overflow: hidden;\n  container-type: inline-size;\n  perspective: calc(var(--hb-ua1-h) * 3.4);\n  perspective-origin: 50% 8%;\n  touch-action: pan-y;\n  cursor: grab;\n  border-radius: 6px;\n  background:\n    radial-gradient(60% 46% at 50% 92%, color-mix(in srgb, var(--hb-ua1-accent) 12%, transparent), transparent 70%),\n    radial-gradient(circle, rgba(255,255,255,.07) 1px, transparent 1.2px) 0 0 / 14px 14px;\n}\n.hb-ua1-stage[data-drag=\"true\"] { cursor: grabbing; }\n.hb-ua1-world {\n  position: absolute;\n  inset: 0;\n  transform-style: preserve-3d;\n}\n.hb-ua1-floor {\n  position: absolute;\n  left: 50%;\n  top: 50%;\n  width: calc(var(--hb-ua1-sp) * 200cqw);\n  aspect-ratio: 1;\n  transform: translate(-50%, -50%) translateY(calc(var(--hb-ua1-h) * .35)) translateZ(calc(var(--hb-ua1-sp) * -100cqw)) rotateX(90deg);\n  pointer-events: none;\n}\n.hb-ua1-floor svg { display: block; width: 100%; height: 100%; overflow: visible; }\n.hb-ua1-card {\n  position: absolute;\n  left: 50%;\n  top: 50%;\n  width: min(calc(var(--hb-ua1-h) * .52), 38cqw);\n  height: calc(var(--hb-ua1-h) * .7);\n  margin-top: calc(var(--hb-ua1-h) * -.02);\n  container-type: inline-size;\n  font-size: clamp(8px, calc(var(--hb-ua1-h) * .043), 14px);\n  transform:\n    translate(-50%, -50%)\n    translate3d(calc(var(--hb-ua1-x, 0) * var(--hb-ua1-sp) * 100cqw), 0, calc(var(--hb-ua1-z, 0) * var(--hb-ua1-sp) * 100cqw))\n    rotateY(calc(var(--hb-ua1-r, 0) * 1deg));\n  opacity: var(--hb-ua1-o, 1);\n  backface-visibility: hidden;\n  will-change: transform, opacity;\n  cursor: pointer;\n}\n.hb-ua1-face {\n  position: relative;\n  display: flex;\n  flex-direction: column;\n  width: 100%;\n  height: 100%;\n  overflow: hidden;\n  border: 1px solid rgba(255,255,255,.12);\n  border-radius: 4px;\n  background: linear-gradient(180deg, #151515 0%, #0d0d0d 100%);\n  box-shadow: 0 18px 40px -18px rgba(0,0,0,.9);\n  transition: border-color .35s ease, box-shadow .35s ease;\n}\n.hb-ua1-card[data-active=\"true\"] .hb-ua1-face {\n  border-color: color-mix(in srgb, var(--hb-ua1-accent) 55%, rgba(255,255,255,.12));\n  box-shadow: 0 0 0 1px color-mix(in srgb, var(--hb-ua1-accent) 18%, transparent), 0 0 28px -6px color-mix(in srgb, var(--hb-ua1-accent) 45%, transparent), 0 22px 44px -18px rgba(0,0,0,.95);\n}\n.hb-ua1-k {\n  position: absolute;\n  width: 9px;\n  height: 9px;\n  border-color: rgba(255,255,255,.55);\n  border-style: solid;\n  border-width: 0;\n  pointer-events: none;\n  z-index: 2;\n  transition: border-color .35s ease, transform .35s ease;\n}\n.hb-ua1-k-tl { left: 4px; top: 4px; border-left-width: 1px; border-top-width: 1px; }\n.hb-ua1-k-tr { right: 4px; top: 4px; border-right-width: 1px; border-top-width: 1px; }\n.hb-ua1-k-bl { left: 4px; bottom: 4px; border-left-width: 1px; border-bottom-width: 1px; }\n.hb-ua1-k-br { right: 4px; bottom: 4px; border-right-width: 1px; border-bottom-width: 1px; }\n.hb-ua1-card[data-active=\"true\"] .hb-ua1-k { border-color: var(--hb-ua1-accent); }\n.hb-ua1-art {\n  position: relative;\n  flex: 0 0 46%;\n  border-bottom: 1px solid rgba(255,255,255,.08);\n  background: radial-gradient(80% 90% at 50% 100%, color-mix(in srgb, var(--hb-ua1-accent) 16%, transparent), transparent 70%), #0b0b0b;\n}\n.hb-ua1-art svg { position: absolute; inset: 0; width: 100%; height: 100%; }\n.hb-ua1-body {\n  display: flex;\n  flex: 1 1 auto;\n  min-height: 0;\n  flex-direction: column;\n  gap: .35em;\n  padding: .8em .9em .85em;\n}\n.hb-ua1-meta {\n  display: flex;\n  justify-content: space-between;\n  gap: .5em;\n  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;\n  font-size: .68em;\n  letter-spacing: .14em;\n  text-transform: uppercase;\n  color: #8f8f8f;\n  white-space: nowrap;\n}\n.hb-ua1-card[data-active=\"true\"] .hb-ua1-meta span:last-child { color: var(--hb-ua1-accent); }\n.hb-ua1-title {\n  margin: 0;\n  font-size: 1.18em;\n  font-weight: 600;\n  line-height: 1.15;\n  letter-spacing: -.01em;\n  white-space: nowrap;\n  overflow: hidden;\n  text-overflow: ellipsis;\n}\n.hb-ua1-text {\n  margin: 0;\n  font-size: .82em;\n  line-height: 1.4;\n  color: #a1a1a1;\n  display: -webkit-box;\n  -webkit-line-clamp: 2;\n  -webkit-box-orient: vertical;\n  overflow: hidden;\n}\n.hb-ua1-tag {\n  align-self: flex-start;\n  margin-top: auto;\n  padding: .28em .55em;\n  border: 1px solid rgba(255,255,255,.14);\n  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;\n  font-size: .62em;\n  letter-spacing: .14em;\n  color: #cfcfcf;\n  text-transform: uppercase;\n}\n.hb-ua1-card[data-active=\"true\"] .hb-ua1-tag { border-color: color-mix(in srgb, var(--hb-ua1-accent) 60%, transparent); color: #fff; }\n@container (max-width: 118px) {\n  .hb-ua1-text { display: none; }\n  .hb-ua1-body { gap: .3em; padding: .65em .7em .7em; }\n}\n.hb-ua1-bar {\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  gap: 10px;\n  height: 30px;\n  flex: 0 0 30px;\n  padding: 0 2px;\n  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;\n  font-size: 10px;\n  letter-spacing: .14em;\n  text-transform: uppercase;\n  color: #8f8f8f;\n}\n.hb-ua1-btn {\n  position: relative;\n  display: inline-grid;\n  place-items: center;\n  width: 26px;\n  height: 22px;\n  margin: 0;\n  padding: 0;\n  border: 1px solid rgba(255,255,255,.14);\n  border-radius: 2px;\n  background: rgba(255,255,255,.025);\n  color: #ededed;\n  cursor: pointer;\n  transition: border-color .2s ease, background-color .2s ease, transform .12s ease;\n}\n.hb-ua1-btn:hover { border-color: color-mix(in srgb, var(--hb-ua1-accent) 70%, transparent); background: color-mix(in srgb, var(--hb-ua1-accent) 10%, transparent); }\n.hb-ua1-btn:active { transform: scale(.94); }\n.hb-ua1-btn:focus-visible { outline: 1px solid var(--hb-ua1-accent); outline-offset: 2px; }\n.hb-ua1-btn svg { width: 12px; height: 12px; }\n.hb-ua1-mid {\n  display: flex;\n  align-items: center;\n  gap: 10px;\n  min-width: 0;\n}\n.hb-ua1-count { color: #ededed; white-space: nowrap; }\n.hb-ua1-count b { color: var(--hb-ua1-accent); font-weight: 500; }\n.hb-ua1-dots { display: flex; gap: 4px; }\n.hb-ua1-dot {\n  width: 10px;\n  height: 2px;\n  background: rgba(255,255,255,.18);\n  transition: background-color .3s ease, width .3s ease;\n}\n.hb-ua1-dot[data-on=\"true\"] { width: 18px; background: var(--hb-ua1-accent); }\n.hb-ua1-sr {\n  position: absolute;\n  width: 1px;\n  height: 1px;\n  margin: -1px;\n  padding: 0;\n  overflow: hidden;\n  clip-path: inset(50%);\n  white-space: nowrap;\n  border: 0;\n}\n@keyframes hb-ua1-spin { to { transform: rotate(360deg); } }\n.hb-ua1-spin { transform-origin: 50% 50%; transform-box: fill-box; animation: hb-ua1-spin 60s linear infinite; }\n@media (max-width: 420px) { .hb-ua1-dots { display: none; } }\n@media (prefers-reduced-motion: reduce) {\n  .hb-ua1-face, .hb-ua1-k, .hb-ua1-btn, .hb-ua1-dot { transition: none; }\n  .hb-ua1-spin { animation: none; }\n}\n`;\n\nfunction hash(n: number) {\n  let x = (n + 1) * 2654435761;\n  x = (x ^ (x >>> 15)) >>> 0;\n  x = Math.imul(x, 2246822519) >>> 0;\n  return (x ^ (x >>> 13)) >>> 0;\n}\n\nfunction mod(i: number, n: number) {\n  return ((i % n) + n) % n;\n}\n\nfunction wrap(d: number, n: number) {\n  let x = mod(d, n);\n  if (x > n / 2) x -= n;\n  return x;\n}\n\nfunction pose(d: number, n: number) {\n  const w = wrap(d, n);\n  const theta = (w * Math.PI * 2) / n;\n  const front = (Math.cos(theta) + 1) / 2;\n  return {\n    x: Math.sin(theta).toFixed(4),\n    z: (Math.cos(theta) - 1).toFixed(4),\n    r: ((theta * 180) / Math.PI * 0.58).toFixed(2),\n    o: (0.22 + 0.78 * Math.pow(front, 1.6)).toFixed(3),\n    zi: String(Math.round(front * 100)),\n  };\n}\n\nfunction Art({ seed }: { seed: number }) {\n  const h = hash(seed);\n  const kind = h % 4;\n  const shapes: React.ReactNode[] = [];\n  if (kind === 0) {\n    for (let i = 0; i < 6; i++) {\n      const r = 6 + i * 6;\n      shapes.push(<circle key={i} cx=\"50\" cy=\"62\" r={r} fill=\"none\" stroke=\"rgba(255,255,255,.28)\" strokeWidth=\".5\" strokeDasharray={i % 2 ? \"1 2\" : undefined} />);\n    }\n    shapes.push(<circle key=\"a\" cx={(30 + (h % 40)).toFixed(0)} cy=\"34\" r=\"2\" fill=\"var(--hb-ua1-accent)\" />);\n  } else if (kind === 1) {\n    for (let i = 0; i < 7; i++) {\n      const y = 12 + i * 6;\n      const amp = 2 + ((h >>> (i * 3)) % 5);\n      shapes.push(\n        <path\n          key={i}\n          d={`M0 ${y} C 25 ${(y - amp).toFixed(1)}, 50 ${(y + amp).toFixed(1)}, 75 ${y} S 100 ${(y - amp).toFixed(1)}, 100 ${y}`}\n          fill=\"none\"\n          stroke={i === 3 ? \"var(--hb-ua1-accent)\" : \"rgba(255,255,255,.26)\"}\n          strokeWidth={i === 3 ? \".8\" : \".5\"}\n        />,\n      );\n    }\n  } else if (kind === 2) {\n    for (let r = 0; r < 5; r++) {\n      for (let c = 0; c < 11; c++) {\n        const v = hash(seed * 97 + r * 11 + c) % 10;\n        shapes.push(<circle key={`${r}-${c}`} cx={(8 + c * 8.4).toFixed(1)} cy={(12 + r * 9).toFixed(1)} r={v > 7 ? 1.4 : 0.7} fill={v === 9 ? \"var(--hb-ua1-accent)\" : \"rgba(255,255,255,.32)\"} />);\n      }\n    }\n  } else {\n    for (let i = 0; i < 18; i++) {\n      const a = (i / 18) * Math.PI * 2;\n      const len = 10 + (hash(seed + i) % 16);\n      shapes.push(\n        <line\n          key={i}\n          x1=\"50\"\n          y1=\"30\"\n          x2={(50 + Math.cos(a) * len).toFixed(2)}\n          y2={(30 + Math.sin(a) * len * 0.8).toFixed(2)}\n          stroke={i === 4 ? \"var(--hb-ua1-accent)\" : \"rgba(255,255,255,.28)\"}\n          strokeWidth=\".5\"\n        />,\n      );\n    }\n    shapes.push(<circle key=\"c\" cx=\"50\" cy=\"30\" r=\"3\" fill=\"none\" stroke=\"rgba(255,255,255,.5)\" strokeWidth=\".5\" />);\n  }\n  return (\n    <svg viewBox=\"0 0 100 60\" preserveAspectRatio=\"xMidYMid slice\" aria-hidden=\"true\">\n      <line x1=\"0\" y1=\"59.5\" x2=\"100\" y2=\"59.5\" stroke=\"rgba(255,255,255,.1)\" strokeWidth=\".5\" />\n      {shapes}\n    </svg>\n  );\n}\n\ninterface Engine {\n  go: (delta: number) => void;\n  goTo: (i: number) => void;\n  down: (e: React.PointerEvent<HTMLDivElement>) => void;\n  move: (e: React.PointerEvent<HTMLDivElement>) => void;\n  up: (e: React.PointerEvent<HTMLDivElement>) => void;\n  dragging: () => boolean;\n  moved: () => boolean;\n}\n\nexport function CarouselRing3d({\n  items = defaultItems,\n  index,\n  defaultIndex = 0,\n  onActiveChange,\n  autoplay = 0,\n  height = 340,\n  spread = 0.36,\n  accent = \"#ff4d4d\",\n  label = \"Experiments\",\n  showControls = true,\n  className,\n  style,\n  onKeyDown,\n  ...rest\n}: CarouselRing3dProps) {\n  const list = items.length ? items : defaultItems;\n  const n = list.length;\n  const [start] = React.useState(() => mod(index ?? defaultIndex, Math.max(1, n)));\n  const [active, setActive] = React.useState(start);\n  const [hover, setHover] = React.useState(false);\n  const [focus, setFocus] = React.useState(false);\n  const [drag, setDrag] = React.useState(false);\n  const stageRef = React.useRef<HTMLDivElement>(null);\n  const cardRefs = React.useRef<(HTMLDivElement | null)[]>([]);\n  const engine = React.useRef<Engine | null>(null);\n  const state = React.useRef({ rot: start, target: start, vel: 0, active: start });\n  const listRef = React.useRef(list);\n  const onActiveRef = React.useRef(onActiveChange);\n\n  React.useEffect(() => {\n    listRef.current = list;\n    onActiveRef.current = onActiveChange;\n  });\n\n  React.useEffect(() => {\n    const s = state.current;\n    const reduced = window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches;\n    let raf = 0;\n    let last = 0;\n    let pointer: { id: number; x: number; rot: number; t: number; unit: number; moved: boolean } | null = null;\n    let dragging = false;\n    let moved = false;\n\n    const apply = () => {\n      for (let i = 0; i < n; i++) {\n        const el = cardRefs.current[i];\n        if (!el) continue;\n        const p = pose(i - s.rot, n);\n        el.style.setProperty(\"--hb-ua1-x\", p.x);\n        el.style.setProperty(\"--hb-ua1-z\", p.z);\n        el.style.setProperty(\"--hb-ua1-r\", p.r);\n        el.style.setProperty(\"--hb-ua1-o\", p.o);\n        el.style.zIndex = p.zi;\n      }\n      const idx = mod(Math.round(s.rot), n);\n      if (idx !== s.active) {\n        s.active = idx;\n        setActive(idx);\n        onActiveRef.current?.(idx, listRef.current[idx]);\n      }\n    };\n\n    const tick = (t: number) => {\n      const dt = last ? Math.min(0.034, (t - last) / 1000) : 0.016;\n      last = t;\n      const k = 110;\n      const c = 2 * Math.sqrt(k) * 0.9;\n      const a = (s.target - s.rot) * k - s.vel * c;\n      s.vel += a * dt;\n      s.rot += s.vel * dt;\n      if (Math.abs(s.target - s.rot) < 0.0005 && Math.abs(s.vel) < 0.003) {\n        s.rot = s.target;\n        s.vel = 0;\n        apply();\n        raf = 0;\n        last = 0;\n        return;\n      }\n      apply();\n      raf = requestAnimationFrame(tick);\n    };\n\n    const kick = () => {\n      if (reduced) {\n        s.rot = s.target;\n        s.vel = 0;\n        apply();\n        return;\n      }\n      if (!raf) {\n        last = 0;\n        raf = requestAnimationFrame(tick);\n      }\n    };\n\n    s.rot = Math.round(s.rot);\n    s.target = s.rot;\n    s.vel = 0;\n    apply();\n\n    engine.current = {\n      go(delta) {\n        if (dragging) return;\n        s.target = Math.round(s.target) + delta;\n        kick();\n      },\n      goTo(i) {\n        if (dragging) return;\n        const base = Math.round(s.target);\n        const d = wrap(i - base, n);\n        if (Math.abs(d) < 0.001 && Math.abs(s.rot - base) < 0.001) return;\n        s.target = base + Math.round(d);\n        kick();\n      },\n      down(e) {\n        if (e.button !== 0 && e.pointerType === \"mouse\") return;\n        const w = stageRef.current?.clientWidth ?? 400;\n        pointer = { id: e.pointerId, x: e.clientX, rot: s.rot, t: e.timeStamp, unit: Math.max(60, w * 0.34), moved: false };\n        moved = false;\n        s.vel = 0;\n        if (raf) {\n          cancelAnimationFrame(raf);\n          raf = 0;\n        }\n      },\n      move(e) {\n        if (!pointer || pointer.id !== e.pointerId) return;\n        const dx = e.clientX - pointer.x;\n        if (!pointer.moved && Math.abs(dx) > 5) {\n          pointer.moved = true;\n          moved = true;\n          dragging = true;\n          setDrag(true);\n          stageRef.current?.setPointerCapture(e.pointerId);\n        }\n        if (!pointer.moved) return;\n        const next = pointer.rot - dx / pointer.unit;\n        const dt = Math.max(1, e.timeStamp - pointer.t) / 1000;\n        const v = (next - s.rot) / dt;\n        s.vel = s.vel * 0.6 + v * 0.4;\n        pointer.t = e.timeStamp;\n        s.rot = next;\n        s.target = next;\n        apply();\n      },\n      up(e) {\n        if (!pointer || pointer.id !== e.pointerId) return;\n        const wasDrag = pointer.moved;\n        pointer = null;\n        if (!wasDrag) return;\n        dragging = false;\n        setDrag(false);\n        const v = Math.max(-12, Math.min(12, s.vel));\n        const projected = s.rot + v * 0.22;\n        const base = Math.round(s.rot);\n        s.target = Math.max(base - 3, Math.min(base + 3, Math.round(projected)));\n        s.vel = v;\n        kick();\n      },\n      dragging: () => dragging,\n      moved: () => moved,\n    };\n\n    return () => {\n      if (raf) cancelAnimationFrame(raf);\n      engine.current = null;\n    };\n  }, [n]);\n\n  React.useEffect(() => {\n    if (index === undefined) return;\n    engine.current?.goTo(mod(index, n));\n  }, [index, n]);\n\n  React.useEffect(() => {\n    if (!autoplay || autoplay < 400 || hover || focus || drag) return;\n    if (window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches) return;\n    const id = window.setInterval(() => {\n      if (!document.hidden) engine.current?.go(1);\n    }, autoplay);\n    return () => window.clearInterval(id);\n  }, [autoplay, hover, focus, drag]);\n\n  const handleKey = (e: React.KeyboardEvent<HTMLDivElement>) => {\n    onKeyDown?.(e);\n    if (e.defaultPrevented) return;\n    if (e.key === \"ArrowRight\") {\n      e.preventDefault();\n      engine.current?.go(1);\n    } else if (e.key === \"ArrowLeft\") {\n      e.preventDefault();\n      engine.current?.go(-1);\n    } else if (e.key === \"Home\") {\n      e.preventDefault();\n      engine.current?.goTo(0);\n    } else if (e.key === \"End\") {\n      e.preventDefault();\n      engine.current?.goTo(n - 1);\n    }\n  };\n\n  const current = list[active] ?? list[0];\n  const pad = (v: number) => String(v).padStart(2, \"0\");\n  const stageHeight = Math.max(120, height - (showControls ? 30 : 0));\n\n  return (\n    <div\n      role=\"region\"\n      aria-roledescription=\"carousel\"\n      aria-label={label}\n      tabIndex={0}\n      className={[\"hb-ua1\", className].filter(Boolean).join(\" \")}\n      style={{ [\"--hb-ua1-accent\" as string]: accent, height, ...style }}\n      onKeyDown={handleKey}\n      onPointerEnter={() => setHover(true)}\n      onPointerLeave={() => setHover(false)}\n      onFocus={() => setFocus(true)}\n      onBlur={(e) => {\n        if (!e.currentTarget.contains(e.relatedTarget as Node | null)) setFocus(false);\n      }}\n      {...rest}\n    >\n      <style href=\"hb-carousel-ring-3d\" precedence=\"default\">{css}</style>\n      <div\n        ref={stageRef}\n        className=\"hb-ua1-stage\"\n        data-drag={drag ? \"true\" : \"false\"}\n        style={{ [\"--hb-ua1-h\" as string]: `${stageHeight}px`, [\"--hb-ua1-sp\" as string]: spread.toFixed(3) }}\n        onPointerDown={(e) => engine.current?.down(e)}\n        onPointerMove={(e) => engine.current?.move(e)}\n        onPointerUp={(e) => engine.current?.up(e)}\n        onPointerCancel={(e) => engine.current?.up(e)}\n      >\n        <div className=\"hb-ua1-world\">\n          <div className=\"hb-ua1-floor\" aria-hidden=\"true\">\n            <svg viewBox=\"0 0 200 200\">\n              <g className=\"hb-ua1-spin\">\n                <circle cx=\"100\" cy=\"100\" r=\"99\" fill=\"none\" stroke=\"rgba(255,255,255,.4)\" strokeWidth=\".8\" strokeDasharray=\"0.8 3.2\" strokeLinecap=\"round\" />\n                <circle cx=\"100\" cy=\"100\" r=\"84\" fill=\"none\" stroke=\"rgba(255,255,255,.14)\" strokeWidth=\".5\" strokeDasharray=\"0.6 4\" />\n                {Array.from({ length: 24 }, (_, i) => {\n                  const a = (i / 24) * Math.PI * 2;\n                  return (\n                    <line\n                      key={i}\n                      x1={(100 + Math.cos(a) * 92).toFixed(2)}\n                      y1={(100 + Math.sin(a) * 92).toFixed(2)}\n                      x2={(100 + Math.cos(a) * (i % 6 === 0 ? 104 : 96)).toFixed(2)}\n                      y2={(100 + Math.sin(a) * (i % 6 === 0 ? 104 : 96)).toFixed(2)}\n                      stroke={i % 6 === 0 ? \"var(--hb-ua1-accent)\" : \"rgba(255,255,255,.25)\"}\n                      strokeWidth=\".6\"\n                    />\n                  );\n                })}\n              </g>\n              <circle cx=\"100\" cy=\"199\" r=\"2\" fill=\"var(--hb-ua1-accent)\" />\n            </svg>\n          </div>\n          {list.map((item, i) => {\n            const p = pose(i - start, n);\n            const on = i === active;\n            return (\n              <div\n                key={item.id}\n                ref={(el) => {\n                  cardRefs.current[i] = el;\n                }}\n                className=\"hb-ua1-card\"\n                data-active={on ? \"true\" : \"false\"}\n                role=\"group\"\n                aria-roledescription=\"slide\"\n                aria-label={`${i + 1} of ${n}: ${item.title}`}\n                aria-hidden={on ? undefined : true}\n                style={{\n                  [\"--hb-ua1-x\" as string]: p.x,\n                  [\"--hb-ua1-z\" as string]: p.z,\n                  [\"--hb-ua1-r\" as string]: p.r,\n                  [\"--hb-ua1-o\" as string]: p.o,\n                  zIndex: Number(p.zi),\n                }}\n                onClick={() => {\n                  if (engine.current?.moved()) return;\n                  engine.current?.goTo(i);\n                }}\n              >\n                <div className=\"hb-ua1-face\">\n                  <span className=\"hb-ua1-k hb-ua1-k-tl\" />\n                  <span className=\"hb-ua1-k hb-ua1-k-tr\" />\n                  <span className=\"hb-ua1-k hb-ua1-k-bl\" />\n                  <span className=\"hb-ua1-k hb-ua1-k-br\" />\n                  <div className=\"hb-ua1-art\">\n                    <Art seed={i + item.id.length * 7} />\n                  </div>\n                  <div className=\"hb-ua1-body\">\n                    <div className=\"hb-ua1-meta\">\n                      <span>{item.kicker ?? `ITEM ${pad(i + 1)}`}</span>\n                      <span>{pad(i + 1)}</span>\n                    </div>\n                    <h3 className=\"hb-ua1-title\">{item.title}</h3>\n                    {item.text ? <p className=\"hb-ua1-text\">{item.text}</p> : null}\n                    {item.tag ? <span className=\"hb-ua1-tag\">{item.tag}</span> : null}\n                  </div>\n                </div>\n              </div>\n            );\n          })}\n        </div>\n      </div>\n      {showControls ? (\n        <div className=\"hb-ua1-bar\">\n          <button type=\"button\" className=\"hb-ua1-btn\" aria-label=\"Previous\" onClick={() => engine.current?.go(-1)}>\n            <svg viewBox=\"0 0 12 12\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.3\" aria-hidden=\"true\">\n              <path d=\"M7.5 2.5 4 6l3.5 3.5\" />\n            </svg>\n          </button>\n          <div className=\"hb-ua1-mid\">\n            <span className=\"hb-ua1-count\">\n              <b>{pad(active + 1)}</b> / {pad(n)}\n            </span>\n            <span className=\"hb-ua1-dots\" aria-hidden=\"true\">\n              {list.map((item, i) => (\n                <span key={item.id} className=\"hb-ua1-dot\" data-on={i === active ? \"true\" : \"false\"} />\n              ))}\n            </span>\n          </div>\n          <button type=\"button\" className=\"hb-ua1-btn\" aria-label=\"Next\" onClick={() => engine.current?.go(1)}>\n            <svg viewBox=\"0 0 12 12\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.3\" aria-hidden=\"true\">\n              <path d=\"M4.5 2.5 8 6l-3.5 3.5\" />\n            </svg>\n          </button>\n        </div>\n      ) : null}\n      <span className=\"hb-ua1-sr\" aria-live=\"polite\">\n        {current ? `${current.title}, ${active + 1} of ${n}` : \"\"}\n      </span>\n    </div>\n  );\n}\n\nexport default CarouselRing3d;\n"
    }
  ]
}