{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"gummy-type-input","type":"registry:component","title":"Gummy Type Input","description":"An email field whose letters drop in and land: each typed letter falls from a little above, stretched as it falls and squashed as it lands, while the real input underneath keeps the caret, selection and autofill.","dependencies":[],"registryDependencies":[],"files":[{"path":"components/viberdy/gummy-type-input.tsx","content":"\"use client\";\n\nimport { useEffect, useId, useRef, useState, useSyncExternalStore } from \"react\";\nimport type { CSSProperties, FormEvent, KeyboardEvent as ReactKeyboardEvent, PointerEvent as ReactPointerEvent, ReactNode, RefObject } from \"react\";\n\n/**\n * GummyTypeInput — an email field whose letters drop in and land.\n *\n * Each typed letter falls in from a little above, stretched as it falls and\n * squashed as it lands. The native input stays underneath doing the real\n * work. A bad address wobbles the pill and says why; given onSubmit, a good\n * one hops out and a thank-you shows, and without it the field says so.\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 */\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\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\n/**\n * GummyTypeInput — an email field whose letters drop in and land.\n *\n * Each letter you type falls into the field from a little above, stretched\n * as it falls and squashed as it lands (its area kept), then settles, inside\n * 450ms. The native input stays underneath doing the real work (the caret,\n * selection, autofill, paste); only its drawing is replaced. Submit and the\n * pill squashes under the button; a bad address makes it wobble and says\n * why. Given `onSubmit`, a good address hops out of the field and a thank-you\n * shows; without it, the field says the address is fine but nothing saved it.\n */\nexport function GummyTypeInput({\n  label = \"Get early access\",\n  placeholder = \"you@yourband.com\",\n  button = \"Join the list\",\n  success = \"You're on the list. We'll write when drops open.\",\n  onSubmit,\n  className = \"\",\n}: {\n  label?: string;\n  placeholder?: string;\n  button?: string;\n  success?: string;\n  /** Called with a valid address; may return a promise. Throw to show an error. */\n  onSubmit?: (email: string) => void | Promise<void>;\n  className?: string;\n}) {\n  const id = useId();\n  const [value, setValue] = useState(\"\");\n  const [status, setStatus] = useState<{ tone: \"ok\" | \"err\" | \"note\"; text: string } | null>(null);\n  const [busy, setBusy] = useState(false);\n  const [hopping, setHopping] = useState(false);\n  const inputRef = useRef<HTMLInputElement>(null);\n  const trackRef = useRef<HTMLSpanElement>(null);\n  const pillRef = useRef<HTMLDivElement>(null);\n  const charRefs = useRef<(HTMLSpanElement | null)[]>([]);\n  const pill = useSquish(pillRef);\n  const reduced = useReducedMotion();\n  const sim = useRef({ y: [] as number[], vy: [] as number[], s: [] as number[], sv: [] as number[], raf: 0, last: 0, prev: \"\" });\n  const tickRef = useRef<(now: number) => void>(() => undefined);\n  // A submit can outlive the field (a route change mid-request): nothing is set once it has gone.\n  const alive = useRef(true);\n  const hop = useRef(0);\n  useEffect(() => {\n    alive.current = true;\n    return () => {\n      alive.current = false;\n      window.clearTimeout(hop.current);\n    };\n  }, []);\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      let moving = false;\n      for (let i = 0; i < st.y.length; i++) {\n        for (let k = 0; k < 3; k++) {\n          const h = dt / 3;\n          st.vy[i] += (420 * (0 - st.y[i]) - 20 * st.vy[i]) * h;\n          st.y[i] += st.vy[i] * h;\n          // Falling fast it stretches; the shape's own spring overshoots into a squash as it lands.\n          st.sv[i] += (520 * (1 + clamp(st.vy[i] * 0.0011, -0.25, 0.3) - st.s[i]) - 18 * st.sv[i]) * h;\n          st.s[i] += st.sv[i] * h;\n        }\n        const el = charRefs.current[i];\n        if (el) el.style.transform = `translateY(${st.y[i].toFixed(2)}px) scale(${(1 / st.s[i]).toFixed(4)}, ${st.s[i].toFixed(4)})`;\n        if (Math.abs(st.y[i]) > 0.1 || Math.abs(st.vy[i]) > 1 || Math.abs(st.s[i] - 1) > 0.002 || Math.abs(st.sv[i]) > 0.02) moving = true;\n      }\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\n  // Keep the drawn letters over the native ones when the field scrolls sideways.\n  const sync = () => {\n    const i = inputRef.current;\n    const t = trackRef.current;\n    if (i && t) t.style.transform = `translateX(${-i.scrollLeft}px)`;\n  };\n\n  // New letters (everything after the first change) drop in from above.\n  useEffect(() => {\n    const st = sim.current;\n    const chars = [...value];\n    const was = [...st.prev];\n    let from = 0;\n    while (from < chars.length && from < was.length && chars[from] === was[from]) from++;\n    st.y.length = st.vy.length = st.s.length = st.sv.length = chars.length;\n    for (let i = 0; i < chars.length; i++) {\n      if (st.y[i] === undefined || i >= from) {\n        const fresh = i >= from && chars.length > was.length && !reduced;\n        st.y[i] = fresh ? -16 : 0;\n        st.vy[i] = 0;\n        st.s[i] = 1;\n        st.sv[i] = 0;\n      }\n    }\n    st.prev = value;\n    requestAnimationFrame(sync);\n    if (!st.raf) st.raf = requestAnimationFrame((n) => tickRef.current(n));\n  }, [value, reduced]);\n\n  const submit = async (e: FormEvent) => {\n    e.preventDefault();\n    const email = value.trim();\n    pill.press(0.9);\n    requestAnimationFrame(() => pill.release());\n    if (!/^[^\\s@]+@[^\\s@.]+(?:\\.[^\\s@.]+)+$/.test(email)) {\n      pill.flick(0.9);\n      setStatus({ tone: \"err\", text: email ? \"That doesn't look like an email address.\" : \"Type your email address first.\" });\n      inputRef.current?.focus();\n      return;\n    }\n    if (!onSubmit) {\n      setStatus({ tone: \"note\", text: \"Looks good. Connect onSubmit to save it.\" });\n      return;\n    }\n    setBusy(true);\n    try {\n      await onSubmit(email);\n      if (!alive.current) return;\n      // The address hops out of the field, then the field clears.\n      const st = sim.current;\n      st.vy = st.vy.map((_, i) => -(320 + (i % 5) * 40));\n      setHopping(true);\n      if (!st.raf) st.raf = requestAnimationFrame((n) => tickRef.current(n));\n      hop.current = window.setTimeout(() => {\n        if (!alive.current) return;\n        setHopping(false);\n        setValue(\"\");\n        setStatus({ tone: \"ok\", text: success });\n      }, reduced ? 0 : 320);\n    } catch {\n      if (alive.current) setStatus({ tone: \"err\", text: \"That didn't go through. Try again in a moment.\" });\n    } finally {\n      if (alive.current) setBusy(false);\n    }\n  };\n\n  const field = \"h-full w-full min-w-0 bg-transparent pl-6 pr-2 text-[17px] outline-none\";\n  const type: CSSProperties = { fontFamily: SANS, fontWeight: 500, letterSpacing: \"0.005em\" };\n  return (\n    <form onSubmit={submit} noValidate className={\"tm-scope flex w-full max-w-[560px] flex-col gap-3 \" + className}>\n      <style>{FOCUS_CSS}</style>\n      <label htmlFor={id} className=\"text-[12px] uppercase\" style={{ fontFamily: MONO, letterSpacing: \"0.12em\", color: DOUGH.ink3 }}>\n        {label}\n      </label>\n      <div\n        ref={pillRef}\n        className=\"flex h-[64px] items-center gap-2 rounded-full p-1.5 focus-within:[outline:2.5px_solid_#17130f] focus-within:[outline-offset:3px]\"\n        style={{ background: DOUGH.surface, boxShadow: softShadow(), border: `1px solid ${status?.tone === \"err\" ? DOUGH.gumDeep : DOUGH.line}` }}\n      >\n        <div className=\"relative h-full min-w-0 flex-1 overflow-hidden rounded-full\">\n          <input\n            ref={inputRef}\n            id={id}\n            type=\"email\"\n            maxLength={254}\n            name=\"email\"\n            autoComplete=\"email\"\n            inputMode=\"email\"\n            spellCheck={false}\n            placeholder={placeholder}\n            value={value}\n            onChange={(e) => {\n              setValue(e.target.value);\n              if (status?.tone !== \"ok\") setStatus(null);\n            }}\n            onScroll={sync}\n            onKeyUp={sync}\n            onSelect={sync}\n            aria-invalid={status?.tone === \"err\" || undefined}\n            aria-describedby={id + \"-status\"}\n            className={field + \" focus-visible:!outline-none placeholder:text-[rgba(23,19,15,0.36)]\"}\n            style={{ ...type, color: \"transparent\", caretColor: DOUGH.solid }}\n          />\n          {/* The letters you see: a copy of the value, each letter on its own spring. */}\n          <span aria-hidden className=\"pointer-events-none absolute inset-0 flex items-center overflow-hidden pl-6 pr-2 text-[17px]\" style={{ ...type, color: DOUGH.solid, opacity: hopping ? 0 : 1, transition: hopping ? \"opacity 300ms ease\" : \"none\" }}>\n            <span ref={trackRef} className=\"inline-flex whitespace-pre\" style={{ transition: \"none\" }}>\n              {[...value].map((ch, i) => (\n                <span key={i} ref={(el) => void (charRefs.current[i] = el)} className=\"inline-block\" style={{ transformOrigin: \"50% 85%\", transition: \"none\" }}>\n                  {ch}\n                </span>\n              ))}\n            </span>\n          </span>\n        </div>\n        <SquashPressButton type=\"submit\" variant=\"gum\" size=\"md\" disabled={busy}>\n          {busy ? \"Joining\" : button}\n        </SquashPressButton>\n      </div>\n      <p id={id + \"-status\"} role=\"status\" aria-live=\"polite\" className=\"m-0 min-h-[20px] text-[14px]\" style={{ color: status?.tone === \"err\" ? DOUGH.gumDeep : DOUGH.ink2 }}>\n        {status?.text ?? \"\"}\n      </p>\n    </form>\n  );\n}\n","type":"registry:component","target":"components/viberdy/gummy-type-input.tsx"}],"meta":{"tier":"free","tags":["input","email","form","newsletter","waitlist","typing animation","squash and stretch"],"href":"https://viberdy.dev/library/gummy-type-input","aiPrompt":"Build a React + Tailwind form, `GummyTypeInput({ label, placeholder, button, success, onSubmit, className })`.\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 mono label over a 64px pill (surface, soft shadow, a gum-deep border on error, a focus-within ring) holding the input and a gum squash button, and a live status line. The input's text is transparent with an ink caret; over it an aria-hidden copy of the value in the same font and padding, one inline-block span per letter, translated by -scrollLeft to follow the field. When the value grows, every letter from the first change on starts 16px up: y springs to 0 (k 420, c 20) and the letter's shape s springs (k 520, c 18) toward 1 + clamp(vy * 0.0011, -0.25, 0.3), written as translateY(y) scale(1/s, s) about 50% 85%, so it stretches falling and squashes landing. Submit: squash the pill; an address failing /^[^\\s@]+@[^\\s@.]+(?:\\.[^\\s@.]+)+$/ flicks the pill and explains; without onSubmit say it looks fine but isn't saved; with it, await it, give every letter an upward kick, fade them over 300ms, clear the field and show the thank-you, or show a retry message if it throws.","license":"https://viberdy.dev/license"}}