{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"leather-luggage-tag-on-a-buckled-strap-with-rope-physics-you-can-drag-and-fling","type":"registry:block","title":"Leather Luggage Tag on a Buckled Strap with Rope Physics You Can Drag and Fling","description":"Hanging card shaped as a leather luggage tag on a buckled strap: it swings from a peg, follows your drag and flies when flung. Free React and HTML code.","dependencies":["framer-motion"],"files":[{"path":"components/we-inc/leather-luggage-tag-on-a-buckled-strap-with-rope-physics-you-can-drag-and-fling.tsx","type":"registry:component","content":"import { useCallback, useEffect, useRef } from \"react\";\nimport { useReducedMotion } from \"framer-motion\";\n\n/** What is typed on the card behind the window, and pressed into the leather under it. */\nconst tag = {\n  name: \"Ines Calloway\",\n  street: \"14 Marlow Lane\",\n  town: \"Whitby YO21 3QT\",\n  route: \"LIS to OSL\",\n  monogram: \"I.C.\",\n};\n\n// Everything is in design pixels for a 460 wide scene; the whole scene is scaled to fit.\nconst W = 460;\nconst H = 678;\nconst PEG = { x: 230, y: 96 }; // where the strap hangs from\nconst PEG_R = 17; // radius the strap wraps round\nconst LINKS = 7; // strap segments\nconst LINK = 30; // length of one segment\nconst BODY = 122; // slot to the tag's centre of weight\nconst TAG_W = 172;\nconst TAG_H = 256;\nconst SLOT = { x: 86, y: 30 }; // slot position inside the tag\nconst GRAVITY = 0.27; // pixels per step squared, at 120 steps a second\nconst DAMPING = 0.9982;\nconst SHADOW = { x: 20, y: 28 }; // which way the wall shadow falls\n\ntype Pt = { x: number; y: number; px: number; py: number; w: number };\n\nconst clamp = (v: number, lo: number, hi: number) => Math.min(hi, Math.max(lo, v));\n\nfunction makePoints(angle: number): Pt[] {\n  const pts: Pt[] = [];\n  let x = PEG.x;\n  let y = PEG.y;\n  const dx = Math.sin(angle);\n  const dy = Math.cos(angle);\n  for (let i = 0; i <= LINKS + 1; i++) {\n    pts.push({ x, y, px: x, py: y, w: i === 0 ? 0 : i <= LINKS ? 3 : 0.12 });\n    const len = i < LINKS ? LINK : BODY;\n    x += dx * len;\n    y += dy * len;\n  }\n  pts[LINKS].w = 1.2;\n  return pts;\n}\n\nfunction link(a: Pt, b: Pt, len: number, stiff: number) {\n  const dx = b.x - a.x;\n  const dy = b.y - a.y;\n  const d = Math.hypot(dx, dy) || 0.0001;\n  const sum = a.w + b.w;\n  if (sum === 0) return;\n  const k = ((d - len) / d) * stiff;\n  a.x += dx * k * (a.w / sum);\n  a.y += dy * k * (a.w / sum);\n  b.x -= dx * k * (b.w / sum);\n  b.y -= dy * k * (b.w / sum);\n}\n\n/** A smooth path through a list of points. */\nfunction through(p: { x: number; y: number }[], move: boolean) {\n  let d = `${move ? \"M\" : \"L\"}${p[0].x.toFixed(1)} ${p[0].y.toFixed(1)}`;\n  for (let i = 1; i < p.length - 1; i++) {\n    const mx = (p[i].x + p[i + 1].x) / 2;\n    const my = (p[i].y + p[i + 1].y) / 2;\n    d += `Q${p[i].x.toFixed(1)} ${p[i].y.toFixed(1)} ${mx.toFixed(1)} ${my.toFixed(1)}`;\n  }\n  const last = p[p.length - 1];\n  return `${d}L${last.x.toFixed(1)} ${last.y.toFixed(1)}`;\n}\n\nconst TAG_RADIUS = \"48px 48px 24px 24px\";\n\nexport default function LeatherLuggageTag() {\n  const reduce = useReducedMotion();\n  const rootRef = useRef<HTMLDivElement>(null);\n  const sceneRef = useRef<HTMLDivElement>(null);\n  const tagRef = useRef<HTMLDivElement>(null);\n  const keeperRef = useRef<HTMLDivElement>(null);\n  const shadowRef = useRef<HTMLDivElement>(null);\n  const edgeRef = useRef<HTMLDivElement>(null);\n  const lightRef = useRef<HTMLDivElement>(null);\n  const glossRef = useRef<HTMLDivElement>(null);\n  const buckleRef = useRef<HTMLDivElement>(null);\n  const strapRefs = useRef<(SVGPathElement | null)[]>([]);\n  const sim = useRef({\n    pts: makePoints(0),\n    scale: 1,\n    dragging: false,\n    tx: 0,\n    ty: 0,\n    ox: 0,\n    oy: 0,\n    twist: 0,\n    twistVel: 0,\n    lastTouch: 0,\n    side: 1,\n  });\n\n  const push = useCallback(() => {\n    const s = sim.current;\n    const m = s.pts[LINKS + 1];\n    s.side = -s.side;\n    m.px -= s.side * 7.5;\n    s.pts[LINKS].px -= s.side * 3;\n    s.lastTouch = performance.now();\n  }, []);\n\n  useEffect(() => {\n    const root = rootRef.current;\n    const scene = sceneRef.current;\n    const tagEl = tagRef.current;\n    if (!root || !scene || !tagEl) return;\n    const s = sim.current;\n    s.pts = makePoints(reduce ? 0 : 0.72);\n    let raf = 0;\n    let running = false;\n    let visible = true;\n    let last = 0;\n    let acc = 0;\n\n    const fit = () => {\n      const width = root.clientWidth;\n      s.scale = Math.min(1.18, width / W);\n      scene.style.transform = `translateX(-50%) scale(${s.scale})`;\n      root.style.height = `${Math.round(H * s.scale)}px`;\n    };\n\n    const stepOnce = () => {\n      const pts = s.pts;\n      const m = pts[LINKS + 1];\n      for (let i = 1; i < pts.length; i++) {\n        const p = pts[i];\n        const vx = clamp((p.x - p.px) * DAMPING, -42, 42);\n        const vy = clamp((p.y - p.py) * DAMPING, -42, 42);\n        p.px = p.x;\n        p.py = p.y;\n        p.x += vx;\n        p.y += vy + GRAVITY;\n      }\n      for (let it = 0; it < 14; it++) {\n        if (s.dragging) {\n          m.x += (s.tx - m.x) * 0.35;\n          m.y += (s.ty - m.y) * 0.35;\n        }\n        for (let i = 0; i < LINKS; i++) link(pts[i], pts[i + 1], LINK, 1);\n        link(pts[LINKS], m, BODY, 1);\n        // leather does not fold sharply: a soft constraint between every other point\n        for (let i = 0; i < LINKS - 1; i++) link(pts[i], pts[i + 2], LINK * 2, 0.07);\n      }\n      const target = clamp((m.x - m.px) * 0.085, -0.5, 0.5);\n      s.twistVel += (target - s.twist) * 0.012 - s.twistVel * 0.06;\n      s.twist += s.twistVel;\n    };\n\n    const draw = () => {\n      const pts = s.pts;\n      const slot = pts[LINKS];\n      const m = pts[LINKS + 1];\n      const rot = Math.atan2(-(m.x - slot.x), m.y - slot.y);\n      const deg = (rot * 180) / Math.PI;\n      const tw = (s.twist * 180) / Math.PI;\n      const base = `translate3d(${(slot.x - SLOT.x).toFixed(2)}px, ${(slot.y - SLOT.y).toFixed(2)}px, 0) rotate(${deg.toFixed(2)}deg) rotateY(${tw.toFixed(2)}deg)`;\n      tagEl.style.transform = `perspective(900px) ${base}`;\n      if (keeperRef.current) keeperRef.current.style.transform = `perspective(900px) ${base}`;\n      // the shadow sits further from the tag the more the tag lifts off the wall\n      const lift = 1 + Math.abs(s.twist) * 0.9;\n      if (shadowRef.current) shadowRef.current.style.transform = `translate3d(${(slot.x - SLOT.x + SHADOW.x * lift).toFixed(2)}px, ${(slot.y - SLOT.y + SHADOW.y * lift).toFixed(2)}px, 0) rotate(${deg.toFixed(2)}deg) scaleX(${Math.cos(s.twist).toFixed(3)})`;\n      // thickness and light stay where the lamp is, whatever the tag is doing\n      const c = Math.cos(-rot);\n      const sn = Math.sin(-rot);\n      if (edgeRef.current) edgeRef.current.style.transform = `translate(${(2.2 * c - 3.2 * sn).toFixed(2)}px, ${(2.2 * sn + 3.2 * c).toFixed(2)}px)`;\n      if (lightRef.current) lightRef.current.style.background = `linear-gradient(${(128 - deg).toFixed(1)}deg, rgba(255,236,200,0.34) 0%, rgba(255,236,200,0.06) 34%, rgba(30,12,0,0) 55%, rgba(30,12,0,0.34) 100%)`;\n      if (glossRef.current) glossRef.current.style.transform = `translateX(${(-deg * 1.5 - tw * 2.4).toFixed(1)}px) skewX(-18deg)`;\n\n      // the strap: a loop from the slot, up one side, over the peg and down the other\n      const left: { x: number; y: number }[] = [];\n      const right: { x: number; y: number }[] = [];\n      for (let i = 0; i <= LINKS; i++) {\n        const a = pts[Math.max(0, i - 1)];\n        const b = pts[Math.min(LINKS, i + 1)];\n        const tx = b.x - a.x;\n        const ty = b.y - a.y;\n        const tl = Math.hypot(tx, ty) || 1;\n        const nx = ty / tl;\n        const ny = -tx / tl;\n        const t = i / LINKS;\n        const half = PEG_R + (6.2 - PEG_R) * Math.pow(t, 0.72);\n        left.push({ x: pts[i].x - nx * half, y: pts[i].y - ny * half });\n        right.push({ x: pts[i].x + nx * half, y: pts[i].y + ny * half });\n      }\n      // run the two ends on through the slot so they disappear behind the keeper\n      const ex = (slot.x - pts[LINKS - 1].x) / LINK;\n      const ey = (slot.y - pts[LINKS - 1].y) / LINK;\n      left.push({ x: left[LINKS].x + ex * 11, y: left[LINKS].y + ey * 11 });\n      right.push({ x: right[LINKS].x + ex * 11, y: right[LINKS].y + ey * 11 });\n      const d = `${through([...left].reverse(), true)}A${PEG_R} ${PEG_R} 0 0 1 ${right[0].x.toFixed(1)} ${right[0].y.toFixed(1)}${through(right, false)}`;\n      for (const el of strapRefs.current) if (el) el.setAttribute(\"d\", d);\n\n      if (buckleRef.current) {\n        const a = right[3];\n        const b = right[4];\n        const ang = (Math.atan2(-(b.x - a.x), b.y - a.y) * 180) / Math.PI;\n        buckleRef.current.style.transform = `translate3d(${((a.x + b.x) / 2 - 13).toFixed(2)}px, ${((a.y + b.y) / 2 - 14).toFixed(2)}px, 0) rotate(${ang.toFixed(2)}deg)`;\n      }\n    };\n\n    const frame = (now: number) => {\n      raf = requestAnimationFrame(frame);\n      const dt = Math.min(0.05, (now - last) / 1000);\n      last = now;\n      acc += dt;\n      let n = 0;\n      while (acc >= 1 / 120 && n < 6) {\n        stepOnce();\n        acc -= 1 / 120;\n        n++;\n      }\n      // a small push of its own when it has been left hanging still for a while\n      const m = s.pts[LINKS + 1];\n      if (!s.dragging && now - s.lastTouch > 5200 && Math.abs(m.x - m.px) < 0.02 && Math.abs(m.x - PEG.x) < 3) {\n        s.side = -s.side;\n        m.px -= s.side * 5.5;\n        s.lastTouch = now;\n      }\n      draw();\n    };\n\n    const start = () => {\n      if (running || reduce || !visible || document.hidden) return;\n      running = true;\n      last = performance.now();\n      acc = 0;\n      raf = requestAnimationFrame(frame);\n    };\n    const stop = () => {\n      running = false;\n      cancelAnimationFrame(raf);\n    };\n\n    const toScene = (e: PointerEvent) => {\n      const r = scene.getBoundingClientRect();\n      return { x: (e.clientX - r.left) / s.scale, y: (e.clientY - r.top) / s.scale };\n    };\n    const reach = LINKS * LINK + BODY - 4;\n    const aim = (e: PointerEvent) => {\n      const p = toScene(e);\n      let x = p.x + s.ox;\n      let y = p.y + s.oy;\n      const dx = x - PEG.x;\n      const dy = y - PEG.y;\n      const d = Math.hypot(dx, dy);\n      if (d > reach) {\n        x = PEG.x + (dx / d) * reach;\n        y = PEG.y + (dy / d) * reach;\n      }\n      s.tx = x;\n      s.ty = y;\n    };\n    const down = (e: PointerEvent) => {\n      if (reduce) return;\n      const p = toScene(e);\n      const m = s.pts[LINKS + 1];\n      s.ox = m.x - p.x;\n      s.oy = m.y - p.y;\n      s.dragging = true;\n      aim(e);\n      tagEl.setPointerCapture(e.pointerId);\n      tagEl.style.cursor = \"grabbing\";\n    };\n    const move = (e: PointerEvent) => {\n      if (s.dragging) aim(e);\n    };\n    const up = () => {\n      s.dragging = false;\n      s.lastTouch = performance.now();\n      tagEl.style.cursor = \"grab\";\n    };\n\n    fit();\n    draw();\n    s.lastTouch = performance.now();\n    const ro = new ResizeObserver(fit);\n    ro.observe(root);\n    const io = new IntersectionObserver(([entry]) => {\n      visible = entry.isIntersecting;\n      if (visible) start();\n      else stop();\n    });\n    io.observe(root);\n    const vis = () => (document.hidden ? stop() : start());\n    document.addEventListener(\"visibilitychange\", vis);\n    tagEl.addEventListener(\"pointerdown\", down);\n    tagEl.addEventListener(\"pointermove\", move);\n    tagEl.addEventListener(\"pointerup\", up);\n    tagEl.addEventListener(\"pointercancel\", up);\n    start();\n    return () => {\n      stop();\n      ro.disconnect();\n      io.disconnect();\n      document.removeEventListener(\"visibilitychange\", vis);\n      tagEl.removeEventListener(\"pointerdown\", down);\n      tagEl.removeEventListener(\"pointermove\", move);\n      tagEl.removeEventListener(\"pointerup\", up);\n      tagEl.removeEventListener(\"pointercancel\", up);\n    };\n  }, [reduce]);\n\n  const strapLayers = [\n    { stroke: \"#2f190b\", width: 13.6, dash: undefined, opacity: 1 },\n    { stroke: \"#7c4a22\", width: 11.4, dash: undefined, opacity: 1 },\n    { stroke: \"#a26a35\", width: 8.2, dash: undefined, opacity: 0.5 },\n    { stroke: \"#7c4a22\", width: 5.4, dash: undefined, opacity: 0.9 },\n    { stroke: \"#f0dcb2\", width: 1, dash: \"3.6 3\", opacity: 0.92 },\n  ];\n\n  return (\n    <div\n      ref={rootRef}\n      className=\"relative h-[800px] w-full select-none overflow-hidden bg-[#d6cdbd]\"\n      style={{ backgroundImage: \"radial-gradient(120% 90% at 28% 12%, #ebe4d6 0%, #d9d0c0 46%, #bfb4a0 100%)\" }}\n    >\n      {/* plaster grain on the wall */}\n      <svg className=\"pointer-events-none absolute inset-0 h-full w-full opacity-[0.16] mix-blend-multiply\" aria-hidden=\"true\">\n        <filter id=\"luggage-tag-wall\">\n          <feTurbulence type=\"fractalNoise\" baseFrequency=\"0.8\" numOctaves=\"3\" seed=\"7\" />\n          <feColorMatrix values=\"0 0 0 0 0.3  0 0 0 0 0.26  0 0 0 0 0.2  0 0 0 -1.5 1.05\" />\n        </filter>\n        <rect width=\"100%\" height=\"100%\" filter=\"url(#luggage-tag-wall)\" />\n      </svg>\n\n      <div ref={sceneRef} className=\"absolute left-1/2 top-0 origin-top\" style={{ width: W, height: H, transform: \"translateX(-50%)\" }}>\n        {/* shadows on the wall */}\n        <div className=\"pointer-events-none absolute rounded-full bg-[#3a2a16]/45 blur-[7px]\" style={{ left: PEG.x - 6, top: PEG.y - 2, width: 46, height: 30, transform: \"rotate(54deg)\", transformOrigin: \"8px 8px\" }} />\n        <svg className=\"pointer-events-none absolute left-0 top-0 overflow-visible blur-[5px]\" width={W} height={H} style={{ transform: `translate(${SHADOW.x * 0.55}px, ${SHADOW.y * 0.55}px)` }} aria-hidden=\"true\">\n          <path ref={(el) => { strapRefs.current[0] = el; }} fill=\"none\" stroke=\"#2c1d0c\" strokeOpacity=\"0.34\" strokeWidth=\"13\" strokeLinecap=\"round\" />\n        </svg>\n        <div ref={shadowRef} className=\"pointer-events-none absolute left-0 top-0 bg-[#2c1d0c]/40 blur-[14px]\" style={{ width: TAG_W, height: TAG_H, borderRadius: TAG_RADIUS, transformOrigin: `${SLOT.x}px ${SLOT.y}px` }} />\n\n        {/* the tag */}\n        <div\n          ref={tagRef}\n          className=\"absolute left-0 top-0 cursor-grab touch-none\"\n          style={{ width: TAG_W, height: TAG_H, transformOrigin: `${SLOT.x}px ${SLOT.y}px`, willChange: \"transform\" }}\n        >\n          <div ref={edgeRef} className=\"absolute inset-0 bg-[#3b2110]\" style={{ borderRadius: TAG_RADIUS }} />\n          <div\n            className=\"absolute inset-0 overflow-hidden\"\n            style={{\n              borderRadius: TAG_RADIUS,\n              background: \"linear-gradient(168deg, #b9763a 0%, #a5622b 42%, #8f5122 100%)\",\n              boxShadow: \"inset 0 0 0 1px rgba(58,28,8,0.75), inset 0 0 0 2.5px rgba(214,150,88,0.28), inset 0 0 22px rgba(58,24,4,0.6)\",\n            }}\n          >\n            {/* pebbled grain, lit from the top left */}\n            <svg className=\"absolute inset-0 h-full w-full opacity-60 mix-blend-soft-light\" aria-hidden=\"true\">\n              <filter id=\"luggage-tag-grain\" x=\"0\" y=\"0\" width=\"100%\" height=\"100%\">\n                <feTurbulence type=\"fractalNoise\" baseFrequency=\"0.62\" numOctaves=\"4\" seed=\"11\" result=\"n\" />\n                <feDiffuseLighting in=\"n\" surfaceScale=\"2.4\" diffuseConstant=\"1.05\" lightingColor=\"#ffffff\">\n                  <feDistantLight azimuth=\"225\" elevation=\"52\" />\n                </feDiffuseLighting>\n              </filter>\n              <rect width=\"100%\" height=\"100%\" filter=\"url(#luggage-tag-grain)\" />\n            </svg>\n            {/* saddle stitching: the holes, then the thread */}\n            <div className=\"absolute inset-[9px] border-[1.6px] border-dashed border-[#2b1505]/70\" style={{ borderRadius: \"40px 40px 16px 16px\", transform: \"translate(0.6px, 1px)\" }} />\n            <div className=\"absolute inset-[9px] border-[1.6px] border-dashed border-[#f3e1b9]\" style={{ borderRadius: \"40px 40px 16px 16px\" }} />\n\n            {/* slot the strap goes through */}\n            <div className=\"absolute rounded-full bg-[#1c0e05]\" style={{ left: SLOT.x - 27, top: SLOT.y - 5.5, width: 54, height: 11, boxShadow: \"inset 0 2px 3px rgba(0,0,0,0.9), 0 1px 0 rgba(236,180,120,0.4)\" }} />\n\n            {/* window with the address card behind clear vinyl */}\n            <div className=\"absolute left-[21px] right-[21px] top-[70px] h-[118px] rounded-[7px] bg-[#2a1608]\" style={{ boxShadow: \"0 1px 0 rgba(240,190,130,0.45), 0 -1px 0 rgba(40,18,4,0.6)\" }}>\n              <div className=\"absolute inset-[3px] overflow-hidden rounded-[4.5px] bg-[#f4eddc]\" style={{ boxShadow: \"inset 0 3px 6px rgba(40,20,5,0.55), inset 0 0 0 1px rgba(40,20,5,0.25)\" }}>\n                <div className=\"px-[10px] pt-[9px] font-mono text-[6.5px] uppercase leading-none tracking-[0.2em] text-[#7b6c55]\">Name</div>\n                <div className=\"px-[10px] pt-[4px] font-serif text-[15px] italic leading-none text-[#22304f]\">{tag.name}</div>\n                <div className=\"mx-[10px] mt-[6px] h-px bg-[#c9bda4]\" />\n                <div className=\"px-[10px] pt-[7px] font-mono text-[6.5px] uppercase leading-none tracking-[0.2em] text-[#7b6c55]\">Return to</div>\n                <div className=\"px-[10px] pt-[4px] font-mono text-[9px] leading-[1.35] text-[#2b2a27]\">\n                  {tag.street}\n                  <br />\n                  {tag.town}\n                </div>\n                <div className=\"absolute bottom-[8px] left-[10px] right-[10px] flex items-center justify-between font-mono text-[6.5px] uppercase leading-none tracking-[0.2em] text-[#7b6c55]\">\n                  <span>Flight</span>\n                  <span className=\"rounded-[2px] border border-[#b4472f] px-[4px] py-[2.5px] font-semibold text-[#b4472f]\">{tag.route}</span>\n                </div>\n                {/* the sheen on the vinyl slides as the tag turns */}\n                <div ref={glossRef} className=\"pointer-events-none absolute -inset-y-4 left-[18%] w-[34%]\" style={{ background: \"linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.5) 45%, rgba(255,255,255,0.16) 60%, rgba(255,255,255,0) 100%)\", transform: \"skewX(-18deg)\" }} />\n              </div>\n            </div>\n\n            {/* initials pressed into the leather */}\n            <div className=\"absolute bottom-[26px] left-0 right-0 text-center font-serif text-[21px] tracking-[0.18em]\" style={{ color: \"rgba(58,26,6,0.6)\", textShadow: \"0 1px 0 rgba(255,206,150,0.42), 0 -1px 0 rgba(30,12,0,0.5)\" }}>\n              {tag.monogram}\n            </div>\n            <div ref={lightRef} className=\"pointer-events-none absolute inset-0\" />\n          </div>\n        </div>\n\n        {/* the strap */}\n        <svg className=\"pointer-events-none absolute left-0 top-0 overflow-visible\" width={W} height={H} aria-hidden=\"true\">\n          {strapLayers.map((l, i) => (\n            <path key={i} ref={(el) => { strapRefs.current[i + 1] = el; }} fill=\"none\" stroke={l.stroke} strokeWidth={l.width} strokeDasharray={l.dash} strokeOpacity={l.opacity} strokeLinecap=\"butt\" strokeLinejoin=\"round\" />\n          ))}\n        </svg>\n\n        {/* brass buckle on one side of the loop */}\n        <div ref={buckleRef} className=\"pointer-events-none absolute left-0 top-0 h-[28px] w-[26px]\" style={{ transformOrigin: \"13px 14px\" }}>\n          <div className=\"absolute inset-x-[4px] top-[-9px] h-[7px] rounded-[1.5px] bg-[#5d3618]\" style={{ boxShadow: \"inset 0 1px 0 rgba(230,170,110,0.5), 0 1px 2px rgba(0,0,0,0.5)\" }} />\n          <div\n            className=\"absolute inset-0 rounded-[6px] border-[4px]\"\n            style={{ borderColor: \"#fbe7a4 #b88a34 #7d5a1a #e0bb62\", boxShadow: \"0 2px 3px rgba(30,15,0,0.55), inset 0 1px 1px rgba(60,35,5,0.7)\" }}\n          />\n          <div className=\"absolute left-[11.3px] top-[2px] h-[24px] w-[3.4px] rounded-full\" style={{ background: \"linear-gradient(90deg, #fff0bd, #c59a40 55%, #7d5a1a)\", boxShadow: \"0 1px 1px rgba(0,0,0,0.5)\" }} />\n        </div>\n\n        {/* keeper band riveted across the tag under the slot; the strap ends tuck behind it */}\n        <div ref={keeperRef} className=\"pointer-events-none absolute left-0 top-0\" style={{ width: TAG_W, height: TAG_H, transformOrigin: `${SLOT.x}px ${SLOT.y}px` }}>\n          <div\n            className=\"absolute rounded-[4px]\"\n            style={{\n              left: SLOT.x - 42,\n              top: SLOT.y + 5.5,\n              width: 84,\n              height: 17,\n              background: \"linear-gradient(180deg, #7a4520 0%, #63361a 100%)\",\n              boxShadow: \"0 2px 3px rgba(25,10,0,0.6), inset 0 1px 0 rgba(236,170,104,0.5), inset 0 -1px 0 rgba(25,10,0,0.6)\",\n            }}\n          >\n            {[7, 69].map((x) => (\n              <span key={x} className=\"absolute top-[4.5px] h-[8px] w-[8px] rounded-full\" style={{ left: x, background: \"radial-gradient(circle at 35% 30%, #fff6cf 0%, #e3bf66 35%, #94701f 80%, #5e430c 100%)\", boxShadow: \"0 1px 1.5px rgba(0,0,0,0.6)\" }} />\n            ))}\n          </div>\n        </div>\n\n        {/* turned brass peg */}\n        <div className=\"pointer-events-none absolute rounded-full\" style={{ left: PEG.x - 15, top: PEG.y - 15, width: 30, height: 30, background: \"radial-gradient(circle at 36% 30%, #fff8d8 0%, #f0cf78 22%, #c89b3c 55%, #8a6519 82%, #5a3f0a 100%)\", boxShadow: \"0 3px 5px rgba(30,18,0,0.55), 0 0 0 1px rgba(70,45,5,0.7), inset 0 0 0 3px rgba(255,236,170,0.18), inset 0 0 0 4px rgba(80,52,8,0.35), inset 0 0 0 7.5px rgba(255,236,170,0.12), inset 0 0 0 8.5px rgba(80,52,8,0.3)\" }} />\n      </div>\n\n      <p className=\"pointer-events-none absolute bottom-6 left-6 font-mono text-[10px] uppercase leading-[1.7] tracking-[0.18em] text-[#5b4f3d]\">\n        <span className=\"font-semibold text-[#2f2618]\">Saddle tan / brass</span>\n        <br />\n        Pull the tag and let go\n      </p>\n      <button\n        type=\"button\"\n        onClick={push}\n        aria-label=\"Give the luggage tag a push\"\n        className=\"absolute bottom-5 right-5 flex h-11 w-11 items-center justify-center rounded-full border border-[#2f2618]/25 bg-[#efe8da]/70 text-[#2f2618] transition-colors hover:bg-[#f7f1e4] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#2f2618] focus-visible:ring-offset-2 focus-visible:ring-offset-[#d6cdbd]\"\n      >\n        <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n          <path d=\"M10 2.5v5\" />\n          <path d=\"M10 7.5l-4.2 7.2\" strokeDasharray=\"1.5 2.2\" />\n          <circle cx=\"13.6\" cy=\"14.4\" r=\"2.6\" />\n          <path d=\"M10 7.5l2.4 4.6\" />\n        </svg>\n      </button>\n    </div>\n  );\n}\n"}]}
