{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"instant-camera-that-ejects-photos-you-shake-to-develop","type":"registry:block","title":"Instant Camera That Ejects Photos You Shake to Develop","description":"Press the shutter and a photo feeds out of the camera, lands on the table and develops while you drag and shake it. Free React and Tailwind code, or HTML.","dependencies":["framer-motion"],"files":[{"path":"components/we-inc/instant-camera-that-ejects-photos-you-shake-to-develop.tsx","type":"registry:component","content":"import { useCallback, useEffect, useRef, useState } from \"react\";\nimport { useReducedMotion } from \"framer-motion\";\n\n/** The roll of film: shot in this order, then round again. `note` is pencilled on the white border. */\nconst photos = [\n  { src: \"https://images.pexels.com/photos/11039284/pexels-photo-11039284.jpeg?auto=compress&cs=tinysrgb&w=500\", alt: \"Woman in a black dress and sunglasses against a yellow wall\", note: \"Noon, Calle Ocho\" },\n  { src: \"https://images.pexels.com/photos/11608677/pexels-photo-11608677.jpeg?auto=compress&cs=tinysrgb&w=500\", alt: \"Woman with a bob looking over her shoulder in purple and orange light\", note: \"Odile, studio B\" },\n  { src: \"https://images.pexels.com/photos/28893013/pexels-photo-28893013.jpeg?auto=compress&cs=tinysrgb&w=500\", alt: \"Half an orange on a white ledge against a peach wall\", note: \"Breakfast\" },\n  { src: \"https://images.pexels.com/photos/30089260/pexels-photo-30089260.jpeg?auto=compress&cs=tinysrgb&w=500\", alt: \"Silhouette of a person in sunglasses in deep blue light\", note: \"Blue hour\" },\n  { src: \"https://images.pexels.com/photos/32825246/pexels-photo-32825246.jpeg?auto=compress&cs=tinysrgb&w=500\", alt: \"Man in a red beret and white jacket seated against an orange backdrop\", note: \"Remy waits\" },\n  { src: \"https://images.pexels.com/photos/2907454/pexels-photo-2907454.jpeg?auto=compress&cs=tinysrgb&w=500\", alt: \"Bananas and dragon fruit on yellow and pink plates\", note: \"Still life no. 4\" },\n];\n\n/** Where photos come to rest: x in units of the spread, y in pixels from the top, tilt in degrees. */\nconst spots = [\n  { kx: -1.5, y: 474, r: -9 },\n  { kx: 1.5, y: 466, r: 7 },\n  { kx: -0.5, y: 508, r: 6 },\n  { kx: 0.52, y: 478, r: -8 },\n];\n\nconst NODES = 5;\nconst PHOTO_W = 188;\nconst PHOTO_H = 226;\nconst SLOT_Y = 205;\nconst DEVELOP_SECONDS = 7;\nconst STAGE_H = 700;\n\ntype Phase = \"off\" | \"eject\" | \"free\" | \"held\" | \"leave\";\ntype Body = { phase: Phase; x: number; y: number; r: number; vx: number; vy: number; vr: number; tx: number; ty: number; tr: number; lift: number; d: number; t0: number; energy: number; fade: number; spot: number };\n\nconst clamp = (v: number, lo: number, hi: number) => Math.min(hi, Math.max(lo, v));\nconst smooth = (v: number) => {\n  const t = clamp(v, 0, 1);\n  return t * t * (3 - 2 * t);\n};\n\nexport default function InstantCameraThatEjectsPhotos() {\n  const reduce = useReducedMotion();\n  const [film, setFilm] = useState<number[]>([0, 1, 2, 3, 4]);\n  const [busy, setBusy] = useState(false);\n  const [status, setStatus] = useState(\"Two photos on the table.\");\n\n  const stageRef = useRef<HTMLDivElement>(null);\n  const cameraRef = useRef<HTMLDivElement>(null);\n  const flashRef = useRef<HTMLDivElement>(null);\n  const nodeRefs = useRef<(HTMLDivElement | null)[]>([]);\n  const imageRefs = useRef<(HTMLImageElement | null)[]>([]);\n  const veilRefs = useRef<(HTMLDivElement | null)[]>([]);\n  const glossRefs = useRef<(HTMLDivElement | null)[]>([]);\n  const shadeRefs = useRef<(HTMLDivElement | null)[]>([]);\n\n  const world = useRef({\n    bodies: Array.from({ length: NODES }, (_, i): Body => ({ phase: i < 2 ? \"free\" : \"off\", x: 0, y: 0, r: 0, vx: 0, vy: 0, vr: 0, tx: 0, ty: 0, tr: 0, lift: 0, d: i < 2 ? 1 : 0, t0: 0, energy: 0, fade: 1, spot: i < 2 ? i : -1 })),\n    shots: 0,\n    z: 20,\n    raf: 0,\n    last: 0,\n    spread: 190,\n    scale: 1,\n    width: 1200,\n    held: -1,\n    grabX: 0,\n    grabY: 0,\n    lastShot: -1e9,\n    lastTouch: -1e9,\n    visible: true,\n    ready: false,\n  });\n\n  const draw = useCallback((i: number) => {\n    const w = world.current;\n    const b = w.bodies[i];\n    const node = nodeRefs.current[i];\n    if (!node) return;\n    if (b.phase === \"off\") {\n      node.style.opacity = \"0\";\n      node.style.pointerEvents = \"none\";\n      return;\n    }\n    const size = w.scale * (1 + 0.07 * b.lift);\n    node.style.opacity = b.fade.toFixed(3);\n    node.style.pointerEvents = b.phase === \"eject\" || b.phase === \"leave\" ? \"none\" : \"auto\";\n    node.style.transform = `translate(-50%,-50%) translate3d(${b.x.toFixed(1)}px,${b.y.toFixed(1)}px,0) rotate(${b.r.toFixed(2)}deg) scale(${size.toFixed(3)})`;\n    if (b.phase === \"eject\") {\n      const top = b.y - (PHOTO_H * w.scale) / 2;\n      node.style.clipPath = `inset(${Math.max(0, (SLOT_Y - top) / w.scale).toFixed(1)}px -60px -80px -60px)`;\n    } else if (node.style.clipPath) node.style.clipPath = \"\";\n    const shade = shadeRefs.current[i];\n    if (shade) {\n      shade.style.transform = `translate(${(6 * b.lift).toFixed(1)}px,${(9 + 30 * b.lift).toFixed(1)}px) scale(${(1 + 0.05 * b.lift).toFixed(3)})`;\n      shade.style.opacity = (0.62 - 0.26 * b.lift).toFixed(3);\n    }\n    const gloss = glossRefs.current[i];\n    if (gloss) gloss.style.backgroundPosition = `${(50 + b.r * 3.2 + b.x * 0.05).toFixed(1)}% 0`;\n    // Developing: a milky veil clears while contrast and colour come up from a warm, flat start.\n    const image = imageRefs.current[i];\n    const veil = veilRefs.current[i];\n    if (image && veil) {\n      const d = b.d;\n      veil.style.opacity = (1 - smooth(d * 1.5)).toFixed(3);\n      image.style.filter = d >= 1 ? \"none\" : `contrast(${(0.5 + 0.5 * smooth(d)).toFixed(3)}) saturate(${(0.15 + 0.85 * smooth((d - 0.25) / 0.75)).toFixed(3)}) brightness(${(1.3 - 0.3 * smooth(d)).toFixed(3)}) sepia(${(0.55 * (1 - smooth(d))).toFixed(3)})`;\n    }\n  }, []);\n\n  const measure = useCallback(() => {\n    const w = world.current;\n    const width = stageRef.current?.clientWidth ?? 1200;\n    w.width = width;\n    w.spread = clamp(0.22 * width - 22, 52, 190);\n    w.scale = width < 480 ? 0.82 : 1;\n    w.bodies.forEach((b) => {\n      if (b.spot >= 0 && b.phase === \"free\") {\n        b.tx = spots[b.spot].kx * w.spread;\n        b.ty = spots[b.spot].y;\n        b.tr = spots[b.spot].r;\n      }\n    });\n  }, []);\n\n  const step = useCallback(\n    (now: number) => {\n      const w = world.current;\n      w.raf = 0;\n      const dt = Math.min(0.033, (now - w.last) / 1000 || 0.016);\n      w.last = now;\n      let awake = false;\n      for (let i = 0; i < NODES; i++) {\n        const b = w.bodies[i];\n        if (b.phase === \"off\") continue;\n        if (b.phase === \"eject\") {\n          const t = clamp((now - b.t0) / 950, 0, 1);\n          const from = SLOT_Y - (PHOTO_H * w.scale) / 2 + 4;\n          const to = SLOT_Y + (PHOTO_H * w.scale) / 2 + 10;\n          // The rollers push it out in three short pulls.\n          const feed = (Math.floor(t * 3) + smooth((t * 3) % 1)) / 3;\n          b.x = 0;\n          b.y = from + (to - from) * Math.min(1, feed);\n          b.r = 0;\n          awake = true;\n          if (t >= 1) {\n            b.phase = \"free\";\n            b.vy = 260;\n            b.vx = (b.tx - b.x) * 0.6;\n            b.vr = b.tr * 5;\n            const old = w.bodies.findIndex((o, n) => n !== i && o.spot === b.spot && o.phase !== \"off\");\n            if (old >= 0) {\n              w.bodies[old].phase = \"leave\";\n              w.bodies[old].spot = -1;\n            }\n          }\n        } else {\n          const held = b.phase === \"held\";\n          const k = held ? 300 : b.phase === \"leave\" ? 30 : 110;\n          const c = held ? 26 : b.phase === \"leave\" ? 6 : 15;\n          if (b.phase === \"leave\") {\n            b.ty = STAGE_H + 260;\n            b.fade = clamp(b.fade - dt * 1.6, 0, 1);\n            if (b.fade <= 0) b.phase = \"off\";\n          }\n          if (held) b.tr = clamp(b.vx * 0.045, -24, 24);\n          b.vx += (k * (b.tx - b.x) - c * b.vx) * dt;\n          b.vy += (k * (b.ty - b.y) - c * b.vy) * dt;\n          b.vr += (90 * (b.tr - b.r) - 11 * b.vr) * dt;\n          b.x += b.vx * dt;\n          b.y += b.vy * dt;\n          b.r += b.vr * dt;\n          b.lift += ((held ? 1 : 0) - b.lift) * Math.min(1, dt * 12);\n          const speed = Math.hypot(b.vx, b.vy);\n          b.energy = held ? b.energy * 0.92 + Math.min(1, speed / 900) * 0.4 : b.energy * 0.9;\n          if (held || b.phase === \"leave\" || speed > 3 || Math.abs(b.vr) > 2 || Math.hypot(b.tx - b.x, b.ty - b.y) > 0.4 || b.lift > 0.01) awake = true;\n        }\n        if (b.d < 1) {\n          b.d = Math.min(1, b.d + (dt / DEVELOP_SECONDS) * (1 + b.energy * 2.4));\n          awake = true;\n        }\n        draw(i);\n      }\n      if (awake) w.raf = requestAnimationFrame(step);\n    },\n    [draw],\n  );\n\n  const wake = useCallback(() => {\n    const w = world.current;\n    if (w.raf) return;\n    w.last = performance.now();\n    w.raf = requestAnimationFrame(step);\n  }, [step]);\n\n  const shoot = useCallback(() => {\n    const w = world.current;\n    const now = performance.now();\n    if (now - w.lastShot < 1250) return;\n    w.lastShot = now;\n    const k = w.shots++;\n    const i = (2 + k) % NODES;\n    const spot = (2 + k) % spots.length;\n    const frame = (2 + k) % photos.length;\n    setFilm((list) => list.map((value, n) => (n === i ? frame : value)));\n    setStatus(`New photo: ${photos[frame].alt}. It takes a few seconds to develop.`);\n    const b = w.bodies[i];\n    Object.assign(b, { x: 0, y: SLOT_Y - PHOTO_H / 2, r: 0, vx: 0, vy: 0, vr: 0, lift: 0, d: 0, energy: 0, fade: 1, spot, t0: now });\n    b.tx = spots[spot].kx * w.spread;\n    b.ty = spots[spot].y;\n    b.tr = spots[spot].r + (k % 2 ? 2 : -2);\n    const node = nodeRefs.current[i];\n    if (node) node.style.zIndex = String(++w.z);\n    if (reduce) {\n      const old = w.bodies.findIndex((o, n) => n !== i && o.spot === spot && o.phase !== \"off\");\n      if (old >= 0) {\n        w.bodies[old].phase = \"off\";\n        w.bodies[old].spot = -1;\n        draw(old);\n      }\n      Object.assign(b, { phase: \"free\", x: b.tx, y: b.ty, r: b.tr, d: 1 });\n      draw(i);\n      return;\n    }\n    b.phase = \"eject\";\n    setBusy(true);\n    window.setTimeout(() => setBusy(false), 1250);\n    flashRef.current?.animate?.([{ opacity: 0.9 }, { opacity: 0.25, offset: 0.25 }, { opacity: 0 }], { duration: 520, easing: \"ease-out\" });\n    cameraRef.current?.animate?.([{ transform: \"translateY(0)\" }, { transform: \"translateY(3px) rotate(-0.6deg)\" }, { transform: \"translateY(0)\" }], { duration: 260, easing: \"ease-out\" });\n    wake();\n  }, [draw, reduce, wake]);\n\n  // Lay out the table, then keep shooting until someone takes over (and again after a quiet spell).\n  useEffect(() => {\n    const w = world.current;\n    const stage = stageRef.current;\n    measure();\n    w.bodies.forEach((b, i) => {\n      if (b.phase === \"free\" && !w.ready) Object.assign(b, { x: b.tx, y: b.ty, r: b.tr });\n      draw(i);\n    });\n    w.ready = true;\n    const resize = typeof ResizeObserver !== \"undefined\" ? new ResizeObserver(() => { measure(); if (reduce) w.bodies.forEach((b, i) => { if (b.phase === \"free\") { Object.assign(b, { x: b.tx, y: b.ty, r: b.tr }); draw(i); } }); else wake(); }) : null;\n    const seen = typeof IntersectionObserver !== \"undefined\" ? new IntersectionObserver(([entry]) => { w.visible = entry.isIntersecting; }) : null;\n    if (stage) {\n      resize?.observe(stage);\n      seen?.observe(stage);\n    }\n    let first = 0;\n    let loop = 0;\n    if (!reduce) {\n      const auto = () => {\n        if (w.visible && !document.hidden && performance.now() - w.lastTouch > 9000) shoot();\n      };\n      first = window.setTimeout(auto, 350);\n      loop = window.setInterval(auto, 4300);\n    }\n    return () => {\n      window.clearTimeout(first);\n      window.clearInterval(loop);\n      resize?.disconnect();\n      seen?.disconnect();\n      if (w.raf) cancelAnimationFrame(w.raf);\n      w.raf = 0;\n    };\n  }, [draw, measure, reduce, shoot, wake]);\n\n  const local = (event: React.PointerEvent) => {\n    const box = stageRef.current?.getBoundingClientRect();\n    return { x: event.clientX - (box ? box.left + box.width / 2 : 0), y: event.clientY - (box ? box.top : 0) };\n  };\n  const grab = (i: number) => (event: React.PointerEvent<HTMLDivElement>) => {\n    const w = world.current;\n    const b = w.bodies[i];\n    w.lastTouch = performance.now();\n    if (reduce || (b.phase !== \"free\" && b.phase !== \"held\")) return;\n    event.currentTarget.setPointerCapture(event.pointerId);\n    const p = local(event);\n    w.held = i;\n    w.grabX = p.x - b.x;\n    w.grabY = p.y - b.y;\n    b.phase = \"held\";\n    b.spot = -1;\n    event.currentTarget.style.zIndex = String(++w.z);\n    wake();\n  };\n  const drag = (i: number) => (event: React.PointerEvent<HTMLDivElement>) => {\n    const w = world.current;\n    if (w.held !== i) return;\n    const p = local(event);\n    const b = w.bodies[i];\n    b.tx = p.x - w.grabX;\n    b.ty = p.y - w.grabY;\n    w.lastTouch = performance.now();\n    wake();\n  };\n  const drop = (i: number) => () => {\n    const w = world.current;\n    if (w.held !== i) return;\n    w.held = -1;\n    const b = w.bodies[i];\n    b.phase = \"free\";\n    const reach = Math.max(0, w.width / 2 - 70);\n    b.tx = clamp(b.tx, -reach, reach);\n    b.ty = clamp(b.ty, 330, STAGE_H - 110);\n    b.tr = clamp(b.r * 0.5 + b.vx * 0.01, -14, 14);\n    wake();\n  };\n\n  return (\n    <section\n      ref={stageRef}\n      className=\"relative w-full select-none overflow-hidden\"\n      style={{ height: STAGE_H, background: \"radial-gradient(90% 70% at 50% 22%,#3a3d38 0%,#262925 45%,#161816 100%)\", [\"--s\" as string]: \"clamp(52px, 22vw - 22px, 190px)\" }}\n    >\n      {/* a pool of light on the table */}\n      <div className=\"pointer-events-none absolute inset-x-0 bottom-0 h-[60%]\" style={{ background: \"radial-gradient(60% 70% at 50% 60%,rgba(255,244,224,.09),transparent 70%)\" }} aria-hidden=\"true\" />\n\n      {/* the photos */}\n      {film.map((frame, i) => {\n        const photo = photos[frame];\n        const start = i < 2 ? spots[i] : null;\n        return (\n          <div\n            key={i}\n            ref={(node) => {\n              nodeRefs.current[i] = node;\n            }}\n            onPointerDown={grab(i)}\n            onPointerMove={drag(i)}\n            onPointerUp={drop(i)}\n            onPointerCancel={drop(i)}\n            className=\"absolute left-1/2 top-0 cursor-grab touch-none active:cursor-grabbing\"\n            style={{\n              width: PHOTO_W,\n              height: PHOTO_H,\n              zIndex: 10 + i,\n              opacity: start ? 1 : 0,\n              willChange: \"transform\",\n              transform: start ? `translate(-50%,-50%) translate(calc(var(--s) * ${start.kx}),${start.y}px) rotate(${start.r}deg)` : \"translate(-50%,-50%)\",\n            }}\n          >\n            <div\n              ref={(node) => {\n                shadeRefs.current[i] = node;\n              }}\n              className=\"absolute inset-0 rounded-[6px] bg-black\"\n              style={{ filter: \"blur(13px)\", opacity: 0.62, transform: \"translate(0,9px)\" }}\n              aria-hidden=\"true\"\n            />\n            <div\n              className=\"absolute inset-0 rounded-[3px]\"\n              style={{\n                background: \"linear-gradient(170deg,#fdfcf8 0%,#f3f0e8 60%,#e9e5da 100%)\",\n                boxShadow: \"0 1px 0 #d6d1c4, 0 2px 0 #b9b4a6, 0 3px 1px rgba(0,0,0,.5), inset 0 1px 0 #fff, inset 0 0 0 1px rgba(120,110,90,.12)\",\n              }}\n            >\n              <div className=\"absolute left-[13px] top-[13px] overflow-hidden rounded-[1px] bg-[#8f9a98]\" style={{ width: PHOTO_W - 26, height: PHOTO_W - 26, boxShadow: \"inset 0 0 0 1px rgba(0,0,0,.35)\" }}>\n                <img\n                  alt={photo.alt}\n                  src={photo.src}\n                  ref={(node) => {\n                    imageRefs.current[i] = node;\n                  }}\n                  width={PHOTO_W - 26}\n                  height={PHOTO_W - 26}\n                  loading=\"lazy\"\n                  draggable={false}\n                  className=\"h-full w-full object-cover\"\n                />\n                <div\n                  ref={(node) => {\n                    veilRefs.current[i] = node;\n                  }}\n                  className=\"absolute inset-0\"\n                  style={{ opacity: 0, background: \"radial-gradient(120% 120% at 30% 20%,#b9c2bd 0%,#8f9a98 55%,#6e7a7c 100%)\" }}\n                  aria-hidden=\"true\"\n                />\n                <div\n                  ref={(node) => {\n                    glossRefs.current[i] = node;\n                  }}\n                  className=\"absolute inset-0\"\n                  style={{ background: \"linear-gradient(112deg,rgba(255,255,255,0) 38%,rgba(255,255,255,.28) 47%,rgba(255,255,255,.06) 53%,rgba(255,255,255,0) 62%)\", backgroundSize: \"300% 100%\", backgroundPosition: \"50% 0\", boxShadow: \"inset 0 2px 5px rgba(0,0,0,.35), inset 0 0 0 1px rgba(0,0,0,.2)\" }}\n                  aria-hidden=\"true\"\n                />\n              </div>\n              <p className=\"absolute inset-x-0 bottom-[11px] text-center font-serif text-[13px] italic text-[#4a5568]\" style={{ transform: \"rotate(-1.5deg)\" }}>\n                {photo.note}\n              </p>\n            </div>\n          </div>\n        );\n      })}\n\n      {/* the camera */}\n      <div ref={cameraRef} className=\"absolute left-1/2 top-[40px] z-[5] -ml-[140px] h-[176px] w-[280px]\">\n        <div\n          className=\"absolute inset-0 rounded-[30px]\"\n          style={{\n            background: \"linear-gradient(180deg,#f6f1e6 0%,#e9e2d2 52%,#d3cab6 100%)\",\n            boxShadow: \"inset 0 2px 0 rgba(255,255,255,.9), inset 0 -5px 8px rgba(96,80,50,.35), inset 3px 0 5px rgba(255,255,255,.4), inset -3px 0 6px rgba(96,80,50,.2), 0 28px 40px -14px rgba(0,0,0,.75), 0 6px 10px rgba(0,0,0,.4)\",\n          }}\n          aria-hidden=\"true\"\n        >\n          {/* colour band */}\n          <div className=\"absolute inset-x-0 top-[82px] h-[5px] bg-[#e4572e]\" />\n          <div className=\"absolute inset-x-0 top-[87px] h-[5px] bg-[#f2a541]\" />\n          {/* flash */}\n          <div className=\"absolute left-[22px] top-[20px] h-[36px] w-[62px] rounded-[9px] p-[4px]\" style={{ background: \"linear-gradient(180deg,#2c2c2f,#141416)\", boxShadow: \"0 1px 0 rgba(255,255,255,.7), inset 0 1px 2px rgba(0,0,0,.8)\" }}>\n            <div className=\"h-full w-full rounded-[5px]\" style={{ background: \"repeating-linear-gradient(90deg,rgba(255,255,255,.55) 0 1px,rgba(255,255,255,0) 1px 4px),radial-gradient(60% 90% at 50% 50%,#fffdf2 0%,#d9d6c8 55%,#8c8a80 100%)\" }} />\n          </div>\n          {/* viewfinder */}\n          <div className=\"absolute right-[26px] top-[20px] h-[30px] w-[38px] rounded-[7px] p-[4px]\" style={{ background: \"linear-gradient(180deg,#2c2c2f,#141416)\", boxShadow: \"0 1px 0 rgba(255,255,255,.7)\" }}>\n            <div className=\"h-full w-full rounded-[3px]\" style={{ background: \"linear-gradient(135deg,#5b6f86 0%,#1b2330 45%,#0c1017 100%)\" }} />\n          </div>\n          {/* lens */}\n          <div className=\"absolute left-1/2 top-[24px] -ml-[59px] h-[118px] w-[118px] rounded-full\" style={{ background: \"conic-gradient(from 210deg,#3a3a3d,#0f0f11,#4a4a4e,#161618,#3a3a3d)\", boxShadow: \"0 0 0 5px #ede7d9, 0 0 0 6px rgba(96,80,50,.35), 0 8px 12px rgba(0,0,0,.45), inset 0 2px 3px rgba(255,255,255,.25)\" }}>\n            <div className=\"absolute inset-[11px] rounded-full\" style={{ background: \"repeating-conic-gradient(#1a1a1c 0 4deg,#2b2b2e 4deg 8deg)\", boxShadow: \"inset 0 0 0 2px #050506\" }} />\n            <div className=\"absolute inset-[23px] rounded-full\" style={{ background: \"radial-gradient(circle at 50% 50%,#05060a 0 22%,#1b2a5a 40%,#3a2468 58%,#0a0c18 78%,#000 100%)\", boxShadow: \"inset 0 0 12px #000, 0 0 0 2px #0a0a0b\" }} />\n            <div className=\"absolute left-[36px] top-[31px] h-[20px] w-[30px] rounded-full\" style={{ background: \"radial-gradient(closest-side,rgba(255,255,255,.75),rgba(255,255,255,0))\", transform: \"rotate(-32deg)\" }} />\n            <div className=\"absolute bottom-[34px] right-[36px] h-[9px] w-[13px] rounded-full\" style={{ background: \"radial-gradient(closest-side,rgba(180,210,255,.6),rgba(255,255,255,0))\" }} />\n          </div>\n          {/* print slot */}\n          <div className=\"absolute inset-x-[26px] bottom-[9px] h-[9px] rounded-full\" style={{ background: \"linear-gradient(180deg,#050505,#2a2a2a)\", boxShadow: \"0 1px 0 rgba(255,255,255,.75), inset 0 2px 3px #000\" }} />\n          <span className=\"absolute bottom-[26px] left-[26px] text-[8px] font-bold uppercase tracking-[0.28em] text-[#8a7d62]\">Instant 70</span>\n        </div>\n        <button\n          type=\"button\"\n          onClick={() => {\n            world.current.lastTouch = performance.now();\n            shoot();\n          }}\n          aria-label=\"Take a photo\"\n          aria-disabled={busy}\n          className=\"absolute right-[20px] top-[100px] h-[44px] w-[44px] rounded-full outline-none transition-transform duration-100 focus-visible:ring-2 focus-visible:ring-white focus-visible:ring-offset-2 focus-visible:ring-offset-[#e9e2d2] active:scale-90\"\n          style={{ background: \"radial-gradient(circle at 38% 30%,#ff8f73 0%,#e4572e 45%,#a5321a 100%)\", boxShadow: \"0 0 0 4px #d9d0bd, 0 0 0 5px rgba(96,80,50,.4), 0 4px 6px rgba(0,0,0,.4), inset 0 2px 2px rgba(255,255,255,.5), inset 0 -3px 4px rgba(90,20,5,.5)\" }}\n        />\n      </div>\n\n      {/* flash */}\n      <div ref={flashRef} className=\"pointer-events-none absolute inset-0 z-[90]\" style={{ opacity: 0, background: \"radial-gradient(70% 60% at calc(50% - 87px) 78px,#fffdf5 0%,rgba(255,250,235,.85) 30%,rgba(255,250,235,.35) 100%)\" }} aria-hidden=\"true\" />\n\n      <p className=\"pointer-events-none absolute inset-x-4 bottom-5 z-[4] text-center text-[13px] text-stone-400\">Press the red button. Pick a photo up and shake it to develop it faster.</p>\n      <p className=\"sr-only\" aria-live=\"polite\">\n        {status}\n      </p>\n    </section>\n  );\n}\n"}]}
