{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"wobble-drop-card","type":"registry:component","title":"Wobble Drop Card","description":"A release card that leans toward the pointer on a soft spring while the sticker on its corner follows through, swinging the other way and jiggling to a stop; press it and the card squashes onto its base and pops back.","dependencies":[],"registryDependencies":[],"files":[{"path":"components/viberdy/wobble-drop-card.tsx","content":"\"use client\";\n\nimport { useEffect, useRef, useState, useSyncExternalStore } from \"react\";\nimport type { CSSProperties, KeyboardEvent as ReactKeyboardEvent, PointerEvent as ReactPointerEvent, ReactNode, RefObject } from \"react\";\n\n/**\n * WobbleDropCard — a release card you can push around, with a sticker that lags behind.\n *\n * The card leans toward the pointer on a soft spring and the sticker on\n * its corner follows through, swinging the other way and jiggling to a\n * stop. Press the card and it squashes onto its base, area kept, then pops\n * back. The cover is drawn in code; a squash button adds it to the bag.\n *\n * Part of the Tactile Maximalism kit: dough #f7f0e4, warm ink #17130f and\n * one loud accent, bubblegum #ff2d78, filled once per screen; grain fixed to\n * the material; soft shadows tinted by what casts them, never a hard offset.\n * Everything soft keeps its area as it squashes and settles inside 450ms.\n * Unbounded through var(--font-unbounded) for display over Geist. Respects\n * prefers-reduced-motion. No dependencies beyond React. Paste it as its own\n * file: it repeats the kit's small helpers, which would clash in one module.\n * Load Unbounded with next/font (variable: \"--font-unbounded\") on a\n * parent, or from Google Fonts or @fontsource.\n * Needs Tailwind v4 (on v3.4, add the @tailwindcss/container-queries plugin).\n */\n\nconst SANS = 'var(--font-sans, \"Geist\", \"Inter\", ui-sans-serif, system-ui, sans-serif)';\n\nconst MONO = 'var(--font-mono, \"Geist Mono\", ui-monospace, \"SFMono-Regular\", Menlo, Consolas, monospace)';\n\nconst DISPLAY = 'var(--font-unbounded, \"Unbounded\", var(--font-sans, \"Geist\"), ui-sans-serif, system-ui, sans-serif)';\n\n/** Dough, warm ink, and one loud accent. */\nconst DOUGH = {\n  ground: \"#f7f0e4\",\n  surface: \"#fffaf1\",\n  well: \"#efe5d3\",\n  solid: \"#17130f\",\n  ink: \"rgba(23,19,15,0.92)\",\n  ink2: \"rgba(23,19,15,0.64)\",\n  ink3: \"rgba(23,19,15,0.42)\",\n  line: \"rgba(23,19,15,0.1)\",\n  line2: \"rgba(23,19,15,0.18)\",\n  gum: \"#ff2d78\",\n  gumDeep: \"#d8155d\",\n  lilac: \"#e8e1f6\",\n} as const;\n\n/** A soft object resting in dough: a tight contact shadow and a wide one tinted by the object. */\nfunction softShadow(tint = \"23,19,15\", lift = 1): string {\n  return `0 ${(2 * lift).toFixed(1)}px ${(6 * lift).toFixed(1)}px rgba(23,19,15,0.1), 0 ${(18 * lift).toFixed(1)}px ${(40 * lift).toFixed(1)}px -8px rgba(${tint},${(0.2 * Math.min(1, lift)).toFixed(3)})`;\n}\n\n/** Pressed into the dough: both shadows collapse to one tight line. */\nconst PRESSED_SHADOW = \"0 1px 3px rgba(23,19,15,0.14)\";\n\n/** Static film grain as an SVG noise tile, for CSS backgrounds (4-6% is the kit's range). */\nfunction grainUrl(opacity = 0.05): string {\n  const svg = `<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='g'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.09 0 0 0 0 0.07 0 0 0 0 0.06 0 0 0 ${opacity} 0'/></filter><rect width='160' height='160' filter='url(%23g)'/></svg>`;\n  return `url(\"data:image/svg+xml,${svg.replace(/\"/g, \"'\").replace(/#/g, \"%23\").replace(/</g, \"%3C\").replace(/>/g, \"%3E\")}\")`;\n}\n\nfunction clamp(v: number, lo: number, hi: number): number {\n  return v < lo ? lo : v > hi ? hi : v;\n}\n\n/** Links: strip tabs and newlines, refuse backslashes, allow http(s), mailto, tel and same-site paths. */\nfunction safeHref(raw: string): string {\n  const v = raw.replace(/[\\t\\n\\r]/g, \"\").trim();\n  if (!v || v.includes(\"\\\\\")) return \"#\";\n  if (/^(https?:|mailto:|tel:)/i.test(v)) return v;\n  if (/^[/#?]/.test(v) && !/^\\/\\//.test(v)) return v;\n  return \"#\";\n}\n\nfunction subscribeMotion(cb: () => void) {\n  const m = window.matchMedia(\"(prefers-reduced-motion: reduce)\");\n  m.addEventListener(\"change\", cb);\n  return () => m.removeEventListener(\"change\", cb);\n}\n\n/** True when the visitor asked for reduced motion. False on the server. */\nfunction useReducedMotion(): boolean {\n  return useSyncExternalStore(\n    subscribeMotion,\n    () => window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches,\n    () => false,\n  );\n}\n\n/**\n * Squash and stretch for one element, on a spring. `press(depth)` squashes it\n * onto its foot with its area kept (as short as it gets, it gets as wide);\n * `release()` lets it spring back past rest, one visible overshoot, settled\n * inside 450ms; `flick(v)` gives it a sideways jiggle (a skew) from a push.\n * The transform is written straight to the element; nothing re-renders.\n */\nfunction useSquish(ref: RefObject<HTMLElement | null>, origin = \"50% 100%\") {\n  const reduced = useReducedMotion();\n  const st = useRef({ y: 1, v: 0, t: 1, sk: 0, skv: 0, raf: 0, last: 0 });\n  const tickRef = useRef<(now: number) => void>(() => undefined);\n  useEffect(() => {\n    const s = st.current;\n    const el = ref.current;\n    if (el) {\n      el.style.transformOrigin = origin;\n      // The spring owns the transform; a stylesheet's transition would smear it.\n      el.style.transitionProperty = el.style.transitionProperty && el.style.transitionProperty !== \"all\" ? el.style.transitionProperty : \"none\";\n    }\n    tickRef.current = (now: number) => {\n      s.raf = 0;\n      const dt = s.last ? Math.min(1 / 30, (now - s.last) / 1000) : 1 / 60;\n      s.last = now;\n      // k 420, c 18: one overshoot of about 20%, settled inside ~440ms.\n      for (let i = 0; i < 3; i++) {\n        const h = dt / 3;\n        s.v += (420 * (s.t - s.y) - 18 * s.v) * h;\n        s.y += s.v * h;\n        s.skv += (-380 * s.sk - 20 * s.skv) * h;\n        s.sk += s.skv * h;\n      }\n      const e = ref.current;\n      const y = clamp(s.y, 0.5, 1.6);\n      if (e) e.style.transform = `scale(${(1 / y).toFixed(4)}, ${y.toFixed(4)}) skewX(${s.sk.toFixed(3)}deg)`;\n      const moving = Math.abs(s.v) > 0.002 || Math.abs(s.y - s.t) > 0.0015 || Math.abs(s.sk) > 0.02 || Math.abs(s.skv) > 0.05;\n      if (moving) s.raf = requestAnimationFrame((t) => tickRef.current(t));\n      else {\n        s.last = 0;\n        if (e && s.t === 1) {\n          s.y = 1;\n          s.sk = 0;\n          e.style.transform = \"\";\n        }\n      }\n    };\n    return () => {\n      cancelAnimationFrame(s.raf);\n      s.raf = 0;\n      s.last = 0;\n    };\n  }, [ref, origin]);\n  const kick = () => {\n    const s = st.current;\n    if (!s.raf) s.raf = requestAnimationFrame((t) => tickRef.current(t));\n  };\n  return {\n    press: (depth = 0.86) => {\n      if (reduced) return;\n      st.current.t = clamp(depth, 0.6, 1);\n      kick();\n    },\n    release: () => {\n      st.current.t = 1;\n      if (!reduced) kick();\n    },\n    flick: (v: number) => {\n      if (reduced) return;\n      st.current.skv += clamp(v, -1, 1) * 160;\n      kick();\n    },\n  };\n}\n\n// Each part carries only the CSS it needs, so any one of them works on its own.\n// revert-layer keeps an element's own rounded corners when a host page's focus rule flattens them.\nconst FOCUS_CSS = \".tm-scope :focus-visible,.tm-scope:focus-visible{outline:2.5px solid var(--tm-ring,#17130f)!important;outline-offset:3px;border-radius:revert-layer}\";\n\nconst TM_BUTTON_INK = {\n  gum: { bg: DOUGH.gum, fg: \"#fffaf1\", tint: \"255,45,120\", border: \"transparent\" },\n  ink: { bg: DOUGH.solid, fg: \"#fffaf1\", tint: \"23,19,15\", border: \"transparent\" },\n  soft: { bg: DOUGH.surface, fg: DOUGH.solid, tint: \"23,19,15\", border: \"rgba(23,19,15,0.1)\" },\n} as const;\n\nexport type TmButtonVariant = keyof typeof TM_BUTTON_INK;\n\n/**\n * SquashPressButton — a pill that squashes under your finger and pops back.\n *\n * Press and it squashes onto its base where you pressed, its area kept (as it\n * gets shorter it gets wider); hold and it sinks further, up to a deep press\n * at 600ms; let go and it springs back past rest, one overshoot, settled\n * inside 450ms. Its two shadows (a contact and a wide one tinted by the pill's\n * own colour) collapse to one tight line while pressed. Swipe across it and it\n * jiggles the way you pushed it. Gum, ink and soft; a link when given an href.\n */\nexport function SquashPressButton({\n  children,\n  href,\n  onClick,\n  type = \"button\",\n  variant = \"ink\",\n  size = \"lg\",\n  disabled = false,\n  ariaLabel,\n  className = \"\",\n}: {\n  children: ReactNode;\n  href?: string;\n  onClick?: () => void;\n  type?: \"button\" | \"submit\";\n  variant?: TmButtonVariant;\n  size?: \"lg\" | \"md\" | \"sm\";\n  disabled?: boolean;\n  ariaLabel?: string;\n  className?: string;\n}) {\n  const ink = TM_BUTTON_INK[variant] ?? TM_BUTTON_INK.ink;\n  const bodyRef = useRef<HTMLSpanElement>(null);\n  const squish = useSquish(bodyRef);\n  const [state, setState] = useState<\"rest\" | \"hover\" | \"down\">(\"rest\");\n  const hold = useRef({ t0: 0, raf: 0, x: 0, t: 0 });\n\n  // Holding sinks it further: 0.9 at the press, 0.8 by 600ms.\n  useEffect(() => {\n    const h = hold.current;\n    return () => {\n      cancelAnimationFrame(h.raf);\n      h.raf = 0;\n    };\n  }, []);\n  const deepen = () => {\n    const h = hold.current;\n    const run = (now: number) => {\n      h.raf = 0;\n      const k = clamp((now - h.t0) / 600, 0, 1);\n      squish.press(0.9 - 0.1 * k);\n      if (k < 1) h.raf = requestAnimationFrame(run);\n    };\n    cancelAnimationFrame(h.raf);\n    h.raf = requestAnimationFrame(run);\n  };\n  const down = (xPct: number) => {\n    // It squashes onto its base under your finger, not about its middle.\n    if (bodyRef.current) bodyRef.current.style.transformOrigin = `${clamp(xPct, 15, 85).toFixed(0)}% 100%`;\n    setState(\"down\");\n    hold.current.t0 = performance.now();\n    squish.press(0.9);\n    deepen();\n  };\n  const up = (to: \"rest\" | \"hover\") => {\n    cancelAnimationFrame(hold.current.raf);\n    hold.current.raf = 0;\n    setState(to);\n    squish.release();\n  };\n\n  const pad = size === \"sm\" ? \"h-9 px-4 text-[12.5px]\" : size === \"md\" ? \"h-11 px-5 text-[13.5px]\" : \"h-14 px-7 text-[15px]\";\n  const shadow = state === \"down\" ? PRESSED_SHADOW : softShadow(ink.tint, state === \"hover\" ? 1.3 : 1);\n  const handlers = {\n    \"aria-label\": ariaLabel,\n    className: \"tm-scope group relative inline-flex select-none rounded-full no-underline outline-none \" + (disabled ? \"pointer-events-none opacity-40 \" : \"\") + className,\n    style: { WebkitTapHighlightColor: \"transparent\", touchAction: \"manipulation\" } as CSSProperties,\n    onPointerEnter: (e: ReactPointerEvent<HTMLElement>) => {\n      setState(\"hover\");\n      hold.current.x = e.clientX;\n      hold.current.t = performance.now();\n    },\n    onPointerMove: (e: ReactPointerEvent<HTMLElement>) => {\n      hold.current.x = e.clientX;\n      hold.current.t = performance.now();\n    },\n    onPointerLeave: (e: ReactPointerEvent<HTMLElement>) => {\n      const dt = Math.max(8, performance.now() - hold.current.t);\n      // A quick swipe out leaves it jiggling the way it was pushed.\n      squish.flick(((e.clientX - hold.current.x) / dt) * 0.6);\n      up(\"rest\");\n    },\n    onPointerDown: (e: ReactPointerEvent<HTMLElement>) => {\n      if (e.button !== 0) return;\n      const r = e.currentTarget.getBoundingClientRect();\n      down(((e.clientX - r.left) / Math.max(1, r.width)) * 100);\n    },\n    onPointerUp: () => up(\"hover\"),\n    onPointerCancel: () => up(\"rest\"),\n    onKeyDown: (e: ReactKeyboardEvent<HTMLElement>) => {\n      if (e.repeat) return;\n      if (e.key === \"Enter\" || (e.key === \" \" && !href)) down(50);\n    },\n    onKeyUp: () => {\n      if (state === \"down\") up(\"rest\");\n    },\n    onBlur: () => {\n      if (state === \"down\") up(\"rest\");\n    },\n  };\n  // The pill that squashes and its shadow live on an inner span, so the hit area never moves.\n  const pill = (\n    <span\n      ref={bodyRef}\n      className={\"relative inline-flex items-center justify-center rounded-full \" + pad}\n      style={{\n        background: ink.bg,\n        color: ink.fg,\n        border: `1px solid ${ink.border}`,\n        boxShadow: shadow,\n        fontFamily: DISPLAY,\n        fontWeight: 600,\n        letterSpacing: \"-0.01em\",\n        transition: \"box-shadow 180ms cubic-bezier(0.2, 0.8, 0.2, 1)\",\n        willChange: \"transform\",\n      }}\n    >\n      <span className=\"whitespace-nowrap\">{children}</span>\n    </span>\n  );\n  if (href) {\n    return (\n      <>\n        <style>{FOCUS_CSS}</style>\n        <a href={safeHref(href)} onClick={onClick} {...handlers}>\n          {pill}\n        </a>\n      </>\n    );\n  }\n  return (\n    <>\n      <style>{FOCUS_CSS}</style>\n      <button type={type} onClick={onClick} disabled={disabled} {...handlers}>\n        {pill}\n      </button>\n    </>\n  );\n}\n\nexport type TmCover = { bg: string; fg: string; shape: \"dot\" | \"wave\" | \"stack\" };\n\nexport type TmDrop = {\n  title: string;\n  artist: string;\n  price: string;\n  formats: string[];\n  sticker?: string;\n  stickerTone?: \"gum\" | \"ink\" | \"lilac\";\n  cover: TmCover;\n  href: string;\n  cta: string;\n};\n\n/** A cover drawn in code: one bold shape on a flat ground, with grain. */\nfunction TmCoverArt({ cover, title }: { cover: TmCover; title: string }) {\n  const { bg, fg, shape } = cover;\n  return (\n    <div aria-hidden className=\"relative aspect-square w-full overflow-hidden rounded-[20px]\" style={{ background: bg }}>\n      {shape === \"dot\" ? (\n        <div className=\"absolute rounded-full\" style={{ width: \"74%\", height: \"74%\", left: \"13%\", top: \"8%\", background: fg }} />\n      ) : shape === \"wave\" ? (\n        <svg viewBox=\"0 0 100 100\" preserveAspectRatio=\"none\" className=\"absolute inset-0 h-full w-full\">\n          {[0, 1, 2, 3].map((i) => (\n            <path key={i} d={`M0 ${38 + i * 16} C 22 ${24 + i * 16}, 40 ${54 + i * 16}, 62 ${38 + i * 16} S 92 ${26 + i * 16}, 100 ${36 + i * 16} L100 100 L0 100 Z`} fill={fg} opacity={0.34 + i * 0.22} />\n          ))}\n        </svg>\n      ) : (\n        // A pile of three cushions, each a little askew.\n        [\n          { w: 84, b: 12, r: -4 },\n          { w: 70, b: 31, r: 5 },\n          { w: 54, b: 50, r: -3 },\n        ].map((c, i) => (\n          <div\n            key={i}\n            className=\"absolute rounded-full\"\n            style={{ width: `${c.w}%`, height: \"19%\", left: `${(100 - c.w) / 2}%`, bottom: `${c.b}%`, background: fg, transform: `rotate(${c.r}deg)`, boxShadow: \"0 10px 18px -8px rgba(0,0,0,0.45)\" }}\n          />\n        ))\n      )}\n      <div className=\"absolute inset-0\" style={{ backgroundImage: grainUrl(0.05) }} />\n      <p className=\"absolute bottom-[7%] left-[8%] m-0 max-w-[80%] text-[clamp(14px,6.2cqw,26px)] leading-[0.95]\" style={{ fontFamily: DISPLAY, fontWeight: 800, letterSpacing: \"-0.04em\", color: shape === \"wave\" ? bg : fg }}>\n        {shape === \"stack\" ? \"\" : title}\n      </p>\n    </div>\n  );\n}\n\nconst TM_STICKER_INK = {\n  gum: { bg: DOUGH.gum, fg: \"#fffaf1\", tint: \"216,21,93\" },\n  ink: { bg: DOUGH.solid, fg: \"#fffaf1\", tint: \"23,19,15\" },\n  lilac: { bg: DOUGH.lilac, fg: DOUGH.solid, tint: \"23,19,15\" },\n} as const;\n\n/**\n * WobbleDropCard — a release card you can push around, with a sticker that\n * lags behind.\n *\n * The card leans toward the pointer (up to 6 degrees) on a soft spring, and\n * the sticker on its corner follows through: it swings the other way as the\n * card moves and jiggles to a stop, the way a real sticker's free edge would.\n * Press the card and it squashes onto its base, area kept, then pops back;\n * the sticker bounces with it. The cover is drawn in code. A link on the\n * title and a squash button to add it to the bag.\n */\nexport function WobbleDropCard({ drop, onAdd, className = \"\" }: { drop: TmDrop; onAdd?: (drop: TmDrop) => void; className?: string }) {\n  const tiltRef = useRef<HTMLDivElement>(null);\n  const cardRef = useRef<HTMLDivElement>(null);\n  const stickerRef = useRef<HTMLSpanElement>(null);\n  const squish = useSquish(cardRef);\n  const reduced = useReducedMotion();\n  const sim = useRef({ rx: 0, ry: 0, vx: 0, vy: 0, tx: 0, ty: 0, a: 0, av: 0, raf: 0, last: 0 });\n  const tickRef = useRef<(now: number) => void>(() => undefined);\n  const s = TM_STICKER_INK[drop.stickerTone ?? \"gum\"] ?? TM_STICKER_INK.gum;\n\n  useEffect(() => {\n    const st = sim.current;\n    tickRef.current = (now: number) => {\n      st.raf = 0;\n      const dt = st.last ? Math.min(1 / 30, (now - st.last) / 1000) : 1 / 60;\n      st.last = now;\n      for (let i = 0; i < 2; i++) {\n        const h = dt / 2;\n        // The card leans on a soft spring (k 170, c 18); the sticker is driven by the card's swing.\n        const ax = 170 * (st.tx - st.rx) - 18 * st.vx;\n        const ay = 170 * (st.ty - st.ry) - 18 * st.vy;\n        st.vx += ax * h;\n        st.vy += ay * h;\n        st.rx += st.vx * h;\n        st.ry += st.vy * h;\n        st.av += (-260 * st.a - 9 * st.av - st.vy * 9) * h;\n        st.a += st.av * h;\n      }\n      const t = tiltRef.current;\n      if (t) t.style.transform = `perspective(900px) rotateX(${st.rx.toFixed(3)}deg) rotateY(${st.ry.toFixed(3)}deg)`;\n      const k = stickerRef.current;\n      if (k) k.style.transform = `rotate(${(-12 + st.a).toFixed(3)}deg)`;\n      const moving = Math.abs(st.vx) + Math.abs(st.vy) + Math.abs(st.av) > 0.02 || Math.abs(st.tx - st.rx) + Math.abs(st.ty - st.ry) > 0.01 || Math.abs(st.a) > 0.05;\n      if (moving) st.raf = requestAnimationFrame((n) => tickRef.current(n));\n      else st.last = 0;\n    };\n    return () => {\n      cancelAnimationFrame(st.raf);\n      st.raf = 0;\n      st.last = 0;\n    };\n  }, []);\n  const kick = () => {\n    const st = sim.current;\n    if (!reduced && !st.raf) st.raf = requestAnimationFrame((n) => tickRef.current(n));\n  };\n  const onMove = (e: ReactPointerEvent<HTMLDivElement>) => {\n    if (e.pointerType === \"touch\") return;\n    const r = e.currentTarget.getBoundingClientRect();\n    const px = (e.clientX - r.left) / Math.max(1, r.width) - 0.5;\n    const py = (e.clientY - r.top) / Math.max(1, r.height) - 0.5;\n    sim.current.tx = -py * 12;\n    sim.current.ty = px * 12;\n    kick();\n  };\n  const onLeave = () => {\n    sim.current.tx = 0;\n    sim.current.ty = 0;\n    squish.release();\n    kick();\n  };\n\n  return (\n    <div\n      ref={tiltRef}\n      className={\"tm-scope relative w-full @container \" + className}\n      style={{ transformStyle: \"preserve-3d\", willChange: \"transform\", transition: \"none\" }}\n      onPointerMove={onMove}\n      onPointerLeave={onLeave}\n      onPointerDown={(e) => {\n        if (e.button !== 0 || (e.target instanceof Element && e.target.closest(\"a,button\"))) return;\n        squish.press(0.93);\n        sim.current.av += 60;\n        kick();\n      }}\n      onPointerUp={() => squish.release()}\n      onPointerCancel={() => squish.release()}\n    >\n      <style>{FOCUS_CSS}</style>\n      <div ref={cardRef} className=\"flex flex-col gap-4 rounded-[28px] p-3.5\" style={{ background: DOUGH.surface, boxShadow: softShadow(), border: `1px solid ${DOUGH.line}`, transition: \"none\" }}>\n        <div className=\"relative\">\n          <TmCoverArt cover={drop.cover} title={drop.title} />\n          {drop.sticker ? (\n            <span\n              ref={stickerRef}\n              className=\"absolute -right-2 -top-3 flex h-[76px] w-[76px] items-center justify-center rounded-full text-center text-[11.5px] leading-[1.05]\"\n              style={{ background: s.bg, color: s.fg, fontFamily: DISPLAY, fontWeight: 700, letterSpacing: \"-0.01em\", boxShadow: softShadow(s.tint, 0.7), transform: \"rotate(-12deg)\", transformOrigin: \"30% 20%\", transition: \"none\" }}\n            >\n              {drop.sticker}\n            </span>\n          ) : null}\n        </div>\n        <div className=\"flex flex-col gap-3 px-1.5 pb-1.5\">\n          <div className=\"flex items-start justify-between gap-3\">\n            <div className=\"min-w-0\">\n              <a href={safeHref(drop.href)} className=\"block truncate text-[18px] leading-[1.15] no-underline\" style={{ fontFamily: DISPLAY, fontWeight: 700, letterSpacing: \"-0.02em\", color: DOUGH.solid }}>\n                {drop.title}\n              </a>\n              <p className=\"m-0 mt-1 truncate text-[14px]\" style={{ fontFamily: SANS, color: DOUGH.ink2 }}>\n                {drop.artist}\n              </p>\n            </div>\n            <p className=\"m-0 shrink-0 text-[18px] tabular-nums\" style={{ fontFamily: DISPLAY, fontWeight: 700, color: DOUGH.solid }}>\n              {drop.price}\n            </p>\n          </div>\n          <div className=\"flex items-center justify-between gap-3\">\n            <ul className=\"m-0 flex list-none flex-wrap gap-1.5 p-0\" aria-label=\"Formats\">\n              {drop.formats.map((f) => (\n                <li key={f} className=\"rounded-full px-2.5 py-1 text-[10.5px] uppercase\" style={{ fontFamily: MONO, letterSpacing: \"0.08em\", background: DOUGH.lilac, color: DOUGH.solid }}>\n                  {f}\n                </li>\n              ))}\n            </ul>\n            <SquashPressButton size=\"sm\" variant=\"ink\" onClick={() => onAdd?.(drop)} ariaLabel={`${drop.cta}: ${drop.title}`}>\n              {drop.cta}\n            </SquashPressButton>\n          </div>\n        </div>\n      </div>\n    </div>\n  );\n}\n","type":"registry:component","target":"components/viberdy/wobble-drop-card.tsx"}],"meta":{"tier":"free","tags":["card","product card","sticker","spring","follow through","squash","music","merch"],"href":"https://viberdy.dev/library/wobble-drop-card","aiPrompt":"Build a React + Tailwind card, `WobbleDropCard({ drop, onAdd, className })` where drop = { title, artist, price, formats, sticker, stickerTone, cover: { bg, fg, shape: 'dot' | 'wave' | 'stack' }, href, cta }.\n\nTactile Maximalism grammar: loud but composed. A dough ground #f7f0e4 over most of the page (surfaces #fffaf1, a pressed well #efe5d3), warm ink #17130f at 92/64/42%, hairlines at 10% and 18%; ONE loud accent, bubblegum #ff2d78 (deep #d8155d), as a filled thing once per screen, and one quiet tint, lavender #e8e1f6, only on small chips, never a second loud colour. Grain at 4-6%, monochrome, static, fixed to the material. Depth is soft and tinted: a contact shadow 0 2px 6px rgba(23,19,15,0.1) plus a wide one 0 18px 40px -8px tinted by what casts it (a gum chip casts pink); pressed, both collapse to 0 1px 3px rgba(23,19,15,0.14). Never a hard offset shadow (that is neo-brutalism). Type: Unbounded at 800 through var(--font-unbounded, \"Unbounded\", ...) for one oversized headline per screen (up to ~15cqw, leading 0.92, tracking -0.045em), Geist for reading at 16-17px/1.5, Geist Mono uppercase at 11-12px for labels. Full pills for every control and chip, 28px cards, 20px nested media. Motion: everything soft keeps its area as it squashes (scaleX = 1 / scaleY about its foot), deforms in proportion to the input (where, how long, how fast), overshoots once and settles inside 450ms (a spring near k 420, c 18), and always returns to one legible rest shape. Reduced motion keeps the states and drops the springs.\n\nA 28px card (surface #fffaf1, 1px 10% hairline, the soft two-layer shadow) holding a square cover (20px radius, drawn in code: a big circle, four layered SVG waves, or a pile of three cushions askew, over grain) with a round 76px sticker on its top right corner rotated -12 degrees (gum, ink or lilac, Unbounded 700 11.5px), then the title (a link, Unbounded 700 18px), the artist, the price, lilac mono format chips and a small ink squash button. Physics in one rAF loop that sleeps when settled: the lean is a spring (k 170, c 18) toward rotateX(-12 * py) rotateY(12 * px) from the pointer's position over the card (perspective 900px); the sticker's angle is a spring (k 260, c 9) driven by the card's lean velocity, so it swings against the motion and jiggles out. Press (not on the link or button) squashes the inner card to 0.93 with scale(1/y, y) about its base on the kit's spring and kicks the sticker; leave or release restores it.","license":"https://viberdy.dev/license"}}