{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"wire-postcard-spinner-rack-photo-carousel-that-spins-with-inertia-and-shows-card-backs","type":"registry:block","title":"Wire Postcard Spinner Rack Photo Carousel That Spins with Inertia and Shows Card Backs","description":"3D carousel built as a shop postcard rack: portraits in wire pockets round a pole that spins with inertia and shows card backs. Free React and HTML code.","dependencies":["framer-motion"],"files":[{"path":"components/we-inc/wire-postcard-spinner-rack-photo-carousel-that-spins-with-inertia-and-shows-card-backs.tsx","type":"registry:component","content":"import { useCallback, useEffect, useRef, useState } from \"react\";\nimport { useReducedMotion } from \"framer-motion\";\n\n\n/** Eight columns of the rack. Each holds two postcards: one in the upper pocket, one in the lower. */\nconst columns = [\n  {\n    top: { title: \"Tangerine\", src: \"https://images.pexels.com/photos/39325164/pexels-photo-39325164.jpeg?auto=compress&cs=tinysrgb&w=420\", alt: \"Woman in an orange top seated against a vivid orange backdrop\", tone: \"#e8440f\", focus: \"50% 30%\" },\n    bottom: { title: \"Lime room\", src: \"https://images.pexels.com/photos/7659286/pexels-photo-7659286.jpeg?auto=compress&cs=tinysrgb&w=420\", alt: \"Figure in a long dark coat turned away against a lime green backdrop\", tone: \"#4fa312\", focus: \"50% 40%\" },\n  },\n  {\n    top: { title: \"Half sun\", src: \"https://images.pexels.com/photos/7516560/pexels-photo-7516560.jpeg?auto=compress&cs=tinysrgb&w=420\", alt: \"Woman in a red dress standing in profile against a yellow and red backdrop\", tone: \"#e9b416\", focus: \"50% 35%\" },\n    bottom: { title: \"Rose veil\", src: \"https://images.pexels.com/photos/31301594/pexels-photo-31301594.jpeg?auto=compress&cs=tinysrgb&w=420\", alt: \"Woman in a black dress parting sheer red curtains\", tone: \"#b3214a\", focus: \"50% 35%\" },\n  },\n  {\n    top: { title: \"Magenta lean\", src: \"https://images.pexels.com/photos/21352926/pexels-photo-21352926.jpeg?auto=compress&cs=tinysrgb&w=420\", alt: \"Woman in a green top and black jacket against a magenta backdrop\", tone: \"#c4104d\", focus: \"50% 30%\" },\n    bottom: { title: \"Pearls\", src: \"https://images.pexels.com/photos/35766171/pexels-photo-35766171.jpeg?auto=compress&cs=tinysrgb&w=420\", alt: \"Woman in sunglasses, pearls and a yellow top against a black backdrop\", tone: \"#17151a\", focus: \"50% 35%\" },\n  },\n  {\n    top: { title: \"Green curtain\", src: \"https://images.pexels.com/photos/32174358/pexels-photo-32174358.jpeg?auto=compress&cs=tinysrgb&w=420\", alt: \"Woman in a teal suit standing between deep green curtains\", tone: \"#0c6b3a\", focus: \"50% 40%\" },\n    bottom: { title: \"Black lace\", src: \"https://images.pexels.com/photos/27834206/pexels-photo-27834206.jpeg?auto=compress&cs=tinysrgb&w=420\", alt: \"Woman in glasses and a black lace jacket against a yellow backdrop\", tone: \"#e39a10\", focus: \"50% 35%\" },\n  },\n  {\n    top: { title: \"Painted denim\", src: \"https://images.pexels.com/photos/27820190/pexels-photo-27820190.jpeg?auto=compress&cs=tinysrgb&w=420\", alt: \"Man in a paint-splashed denim jacket against a yellow and white backdrop\", tone: \"#e6b21b\", focus: \"50% 30%\" },\n    bottom: { title: \"Red hour\", src: \"https://images.pexels.com/photos/14668786/pexels-photo-14668786.jpeg?auto=compress&cs=tinysrgb&w=420\", alt: \"Woman in a sheer black top lit red against a crimson backdrop\", tone: \"#b3122f\", focus: \"50% 35%\" },\n  },\n  {\n    top: { title: \"Teal and red\", src: \"https://images.pexels.com/photos/16677542/pexels-photo-16677542.jpeg?auto=compress&cs=tinysrgb&w=420\", alt: \"Close portrait of a woman with red lips lit in teal and red\", tone: \"#0d5a4c\", focus: \"50% 35%\" },\n    bottom: { title: \"Roll neck\", src: \"https://images.pexels.com/photos/35514244/pexels-photo-35514244.jpeg?auto=compress&cs=tinysrgb&w=420\", alt: \"Man in a dark roll neck resting his hand on his temple, lit in blue and red\", tone: \"#3a1420\", focus: \"50% 30%\" },\n  },\n  {\n    top: { title: \"Blue cheek\", src: \"https://images.pexels.com/photos/17784344/pexels-photo-17784344.jpeg?auto=compress&cs=tinysrgb&w=420\", alt: \"Woman lit in blue on one side against an orange backdrop\", tone: \"#d2611f\", focus: \"45% 35%\" },\n    bottom: { title: \"Profile, amber\", src: \"https://images.pexels.com/photos/7658850/pexels-photo-7658850.jpeg?auto=compress&cs=tinysrgb&w=420\", alt: \"Woman in profile resting her chin on her hand in amber and green light\", tone: \"#c26a22\", focus: \"50% 35%\" },\n  },\n  {\n    top: { title: \"Jump\", src: \"https://images.pexels.com/photos/794062/pexels-photo-794062.jpeg?auto=compress&cs=tinysrgb&w=420\", alt: \"Woman mid-stride in a checked coat against an orange backdrop\", tone: \"#e8930f\", focus: \"50% 35%\" },\n    bottom: { title: \"Warm wall\", src: \"https://images.pexels.com/photos/2872643/pexels-photo-2872643.jpeg?auto=compress&cs=tinysrgb&w=420\", alt: \"Woman in sunglasses and an orange top against a sunlit yellow wall\", tone: \"#e3a73c\", focus: \"50% 30%\" },\n  },\n];\n\nconst N = columns.length;\nconst STEP = (Math.PI * 2) / N;\n// Design pixels; the whole rack is scaled to fit its box.\nconst CW = 140; // postcard width\nconst CH = 198; // postcard height\nconst R = 214; // distance from the pole to the face of a card\nconst TIER_Y = [92, 332]; // top edge of the upper and lower pockets\nconst POLE_TOP = 34;\nconst BASE_Y = 596;\nconst SCENE_W = 620;\nconst SCENE_H = 700;\nconst HOLD_MS = 3000;\n\nconst mod = (a: number, n: number) => ((a % n) + n) % n;\nconst clamp = (v: number, lo: number, hi: number) => Math.min(hi, Math.max(lo, v));\n\nconst WIRE = \"#17171a\";\nconst wireGrad = \"linear-gradient(180deg, #55565c 0%, #17171a 45%, #050506 100%)\";\n\ntype Card = { title: string; src: string; alt: string; tone: string; focus: string };\n\nfunction Postcard({ card, plate, live, refs, slot }: { card: Card; plate: number; live: boolean; refs: React.MutableRefObject<Record<string, HTMLDivElement | null>>; slot: string }) {\n  return (\n    <>\n      {/* printed side */}\n      <div className=\"absolute inset-0 overflow-hidden rounded-[3px] bg-[#fbfaf6]\" style={{ backfaceVisibility: \"hidden\", boxShadow: \"0 0 0 0.5px rgba(0,0,0,0.25)\" }}>\n        <div className=\"absolute inset-[7px] overflow-hidden\" style={{ background: card.tone }}>\n          <img src={card.src} alt={live ? card.alt : \"\"} width={CW - 14} height={CH - 14} loading=\"eager\" decoding=\"async\" draggable={false} className=\"h-full w-full object-cover\" style={{ objectPosition: card.focus }} />\n        </div>\n        <div\n          ref={(el) => {\n            refs.current[`${slot}g`] = el;\n          }}\n          className=\"pointer-events-none absolute inset-0\"\n          style={{ background: \"linear-gradient(104deg, rgba(255,255,255,0) 30%, rgba(255,255,255,0.55) 47%, rgba(255,255,255,0.12) 55%, rgba(255,255,255,0) 70%)\", opacity: 0 }}\n        />\n        <div\n          ref={(el) => {\n            refs.current[`${slot}f`] = el;\n          }}\n          className=\"pointer-events-none absolute inset-0 bg-[#1b1206]\"\n          style={{ opacity: 0 }}\n        />\n      </div>\n      {/* written side, seen when the card is on the far side of the rack */}\n      <div aria-hidden=\"true\" className=\"absolute inset-0 overflow-hidden rounded-[3px] bg-[#e9dfcb]\" style={{ backfaceVisibility: \"hidden\", transform: \"rotateY(180deg)\", boxShadow: \"0 0 0 0.5px rgba(0,0,0,0.25)\" }}>\n        <div className=\"absolute left-1/2 top-[14px] h-[92px] w-px bg-neutral-500/60\" />\n        <div className=\"absolute right-[10px] top-[10px] h-[30px] w-[24px] border border-dashed border-neutral-500/80\" />\n        {[52, 66, 80, 94].map((y) => (\n          <div key={y} className=\"absolute right-[10px] h-px w-[50px] bg-neutral-500/60\" style={{ top: y }} />\n        ))}\n        <div className=\"absolute left-[10px] top-[12px] font-mono text-[7px] uppercase leading-[1.5] tracking-[0.14em] text-neutral-600\">\n          Plate {String(plate).padStart(2, \"0\")}\n          <br />\n          {card.title}\n        </div>\n        <div\n          ref={(el) => {\n            refs.current[`${slot}b`] = el;\n          }}\n          className=\"pointer-events-none absolute inset-0 bg-[#1b1206]\"\n          style={{ opacity: 0.4 }}\n        />\n      </div>\n    </>\n  );\n}\n\nexport default function PostcardSpinnerRack() {\n  const reduce = useReducedMotion();\n  const wrapRef = useRef<HTMLDivElement>(null);\n  const sceneRef = useRef<HTMLDivElement>(null);\n  const rotorRef = useRef<HTMLDivElement>(null);\n  const rackRef = useRef<HTMLDivElement>(null);\n  const cardRefs = useRef<(HTMLDivElement | null)[]>([]);\n  const shade = useRef<Record<string, HTMLDivElement | null>>({});\n  const [active, setActive] = useState(0);\n  const sim = useRef({\n    th: 1.6 * STEP,\n    vel: 0,\n    target: 0,\n    free: false,\n    dragging: false,\n    lastX: 0,\n    lastT: 0,\n    scale: 1,\n    paused: false,\n    nextAuto: 0,\n    active: 0,\n    lean: new Array(N * 2).fill(0) as number[],\n    leanV: new Array(N * 2).fill(0) as number[],\n    wob: 0,\n    wobV: 0,\n  });\n\n  const step = useCallback((dir: number) => {\n    const s = sim.current;\n    s.free = false;\n    s.target = Math.round(s.target / STEP) * STEP - dir * STEP;\n    s.nextAuto = performance.now() + HOLD_MS * 2;\n  }, []);\n\n  useEffect(() => {\n    const wrap = wrapRef.current;\n    const scene = sceneRef.current;\n    const rotor = rotorRef.current;\n    const rack = rackRef.current;\n    if (!wrap || !scene || !rotor || !rack) return;\n    const s = sim.current;\n    let raf = 0;\n    let visible = true;\n    let last = performance.now();\n    s.nextAuto = last + 2600;\n    if (reduce) s.th = 0;\n\n    const measure = () => {\n      const narrow = wrap.clientWidth < 520;\n      const sc = clamp(wrap.clientWidth / 610, 0.56, 1.12);\n      s.scale = sc;\n      wrap.style.height = `${Math.round(SCENE_H * sc) + (narrow ? 64 : 0)}px`;\n      scene.style.transform = `translateX(-50%) scale(${sc.toFixed(4)})`;\n    };\n    measure();\n    const ro = new ResizeObserver(measure);\n    ro.observe(wrap);\n\n    const paint = () => {\n      rotor.style.transform = `rotateY(${s.th.toFixed(5)}rad)`;\n      rack.style.transform = `rotateX(-7deg) rotateZ(${s.wob.toFixed(3)}deg)`;\n      for (let i = 0; i < N; i++) {\n        let phi = mod(s.th + i * STEP + Math.PI, Math.PI * 2) - Math.PI;\n        const f = Math.cos(phi);\n        const front = clamp(0.5 * (1 - f), 0, 0.6);\n        const back = clamp(0.1 + 0.34 * (1 + f), 0, 0.5);\n        const gloss = 0.5 * Math.exp(-Math.pow((phi - 0.62) / 0.3, 2));\n        for (let t = 0; t < 2; t++) {\n          const k = i * 2 + t;\n          const c = cardRefs.current[k];\n          if (c) c.style.transform = `rotateZ(${s.lean[k].toFixed(3)}deg)`;\n          const fs = shade.current[`${k}f`];\n          const bs = shade.current[`${k}b`];\n          const gs = shade.current[`${k}g`];\n          if (fs) fs.style.opacity = front.toFixed(3);\n          if (bs) bs.style.opacity = back.toFixed(3);\n          if (gs) gs.style.opacity = gloss.toFixed(3);\n        }\n        phi = 0;\n      }\n      const a = mod(Math.round(-s.th / STEP), N);\n      if (a !== s.active) {\n        s.active = a;\n        setActive(a);\n      }\n    };\n\n    const tick = (now: number) => {\n      const dt = Math.min(0.033, Math.max(0.001, (now - last) / 1000));\n      last = now;\n      const v0 = s.vel;\n      if (reduce) {\n        s.th = s.target;\n        s.vel = 0;\n      } else if (!s.dragging) {\n        if (s.free) {\n          s.th += s.vel * dt;\n          s.vel *= Math.exp(-1.25 * dt);\n          if (Math.abs(s.vel) < 0.9) {\n            s.free = false;\n            s.target = Math.round((s.th + s.vel * 0.18) / STEP) * STEP;\n          }\n        } else {\n          const acc = 34 * (s.target - s.th) - 7.4 * s.vel;\n          s.vel += acc * dt;\n          s.th += s.vel * dt;\n          if (!s.paused && now > s.nextAuto) {\n            s.target = Math.round(s.target / STEP) * STEP - STEP;\n            s.nextAuto = now + HOLD_MS;\n          }\n        }\n      }\n      if (!reduce) {\n        // the cards lag behind every change of speed, then swing back into their pockets\n        const alpha = clamp((s.vel - v0) / dt, -60, 60);\n        for (let k = 0; k < N * 2; k++) {\n          const loose = 0.75 + 0.5 * (((k * 37) % 11) / 10);\n          const a = -150 * s.lean[k] - (9 + loose * 3) * s.leanV[k] - alpha * 2.6 * loose;\n          s.leanV[k] += a * dt;\n          s.lean[k] = clamp(s.lean[k] + s.leanV[k] * dt, -9, 9);\n        }\n        const wa = -120 * s.wob - 9 * s.wobV - alpha * 0.28;\n        s.wobV += wa * dt;\n        s.wob = clamp(s.wob + s.wobV * dt, -1.6, 1.6);\n      }\n      paint();\n      if (visible) raf = requestAnimationFrame(tick);\n    };\n\n    const io = new IntersectionObserver(([e]) => {\n      const was = visible;\n      visible = e.isIntersecting;\n      if (visible && !was) {\n        last = performance.now();\n        raf = requestAnimationFrame(tick);\n      }\n    });\n    io.observe(wrap);\n    raf = requestAnimationFrame(tick);\n\n    const down = (e: PointerEvent) => {\n      if (e.button !== 0 || !(e.target as HTMLElement).closest(\"[data-rack]\")) return;\n      s.dragging = true;\n      s.free = false;\n      s.lastX = e.clientX;\n      s.lastT = performance.now();\n      scene.setPointerCapture(e.pointerId);\n    };\n    const move = (e: PointerEvent) => {\n      if (!s.dragging) return;\n      const now = performance.now();\n      const d = (e.clientX - s.lastX) / (R * s.scale);\n      s.th += d;\n      const dt = Math.max(1, now - s.lastT) / 1000;\n      s.vel = s.vel * 0.6 + (d / dt) * 0.4;\n      s.lastX = e.clientX;\n      s.lastT = now;\n    };\n    const up = () => {\n      if (!s.dragging) return;\n      s.dragging = false;\n      s.vel = clamp(s.vel, -14, 14);\n      if (Math.abs(s.vel) > 0.9) s.free = true;\n      else s.target = Math.round(s.th / STEP) * STEP;\n      s.nextAuto = performance.now() + HOLD_MS * 2.5;\n    };\n    scene.addEventListener(\"pointerdown\", down);\n    scene.addEventListener(\"pointermove\", move);\n    scene.addEventListener(\"pointerup\", up);\n    scene.addEventListener(\"pointercancel\", up);\n\n    return () => {\n      cancelAnimationFrame(raf);\n      ro.disconnect();\n      io.disconnect();\n      scene.removeEventListener(\"pointerdown\", down);\n      scene.removeEventListener(\"pointermove\", move);\n      scene.removeEventListener(\"pointerup\", up);\n      scene.removeEventListener(\"pointercancel\", up);\n    };\n  }, [reduce]);\n\n  const onKey = (e: React.KeyboardEvent) => {\n    if (e.key === \"ArrowRight\") {\n      e.preventDefault();\n      step(1);\n    } else if (e.key === \"ArrowLeft\") {\n      e.preventDefault();\n      step(-1);\n    }\n  };\n  const pause = (v: boolean) => () => {\n    sim.current.paused = v;\n    if (!v) sim.current.nextAuto = performance.now() + HOLD_MS;\n  };\n\n  const hoopR = R - 7;\n  const hoops = [TIER_Y[0] + CH * 0.5, TIER_Y[0] + CH + 5, TIER_Y[1] + CH * 0.5, TIER_Y[1] + CH + 5];\n  const btn = \"grid h-10 w-10 place-items-center rounded-full border border-neutral-900/20 bg-white/50 text-neutral-900 transition hover:bg-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-neutral-900\";\n  const col = columns[active];\n\n  return (\n    <section className=\"relative overflow-hidden bg-[#e9e3d6]\" onMouseEnter={pause(true)} onMouseLeave={pause(false)} onFocus={pause(true)} onBlur={pause(false)}>\n      {/* studio sweep: a soft pool of light behind the rack, falling off to the corners */}\n      <div aria-hidden=\"true\" className=\"pointer-events-none absolute inset-0\" style={{ background: \"radial-gradient(58% 60% at 50% 42%, #faf7f0 0%, #efeadf 42%, #ddd5c5 100%)\" }} />\n      <div\n        ref={wrapRef}\n        role=\"group\"\n        aria-roledescription=\"carousel\"\n        aria-label=\"Spinner rack of postcards. Use the left and right arrow keys to turn the rack.\"\n        tabIndex={0}\n        onKeyDown={onKey}\n        className=\"relative mx-auto w-full overflow-hidden outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-neutral-900/70\"\n        style={{ height: SCENE_H }}\n      >\n        <div\n          ref={sceneRef}\n          className=\"absolute left-1/2 top-0 select-none\"\n          style={{ width: SCENE_W, height: SCENE_H, transformOrigin: \"50% 0\", transform: \"translateX(-50%)\", perspective: \"1500px\", perspectiveOrigin: \"50% 38%\" }}\n        >\n          {/* shadow the rack throws on the floor */}\n          <div aria-hidden=\"true\" className=\"absolute left-1/2 rounded-[50%] bg-[#3b2a12]\" style={{ top: BASE_Y + 12, width: 520, height: 78, marginLeft: -260, filter: \"blur(22px)\", opacity: 0.34 }} />\n          <div aria-hidden=\"true\" className=\"absolute left-1/2 rounded-[50%] bg-[#1d1408]\" style={{ top: BASE_Y + 22, width: 250, height: 38, marginLeft: -118, filter: \"blur(9px)\", opacity: 0.5 }} />\n\n          <div ref={rackRef} data-rack=\"\" className=\"absolute left-1/2 top-0 touch-pan-y\" style={{ transformStyle: \"preserve-3d\", width: 0, height: 0, transformOrigin: `0 ${BASE_Y}px`, transform: \"rotateX(-7deg)\", cursor: \"grab\" }}>\n            {/* weighted base */}\n            <div aria-hidden=\"true\" className=\"absolute rounded-full\" style={{ left: -122, top: BASE_Y + 8 - 122, width: 244, height: 244, transform: \"rotateX(90deg)\", background: \"#050506\" }} />\n            <div\n              aria-hidden=\"true\"\n              className=\"absolute rounded-full\"\n              style={{ left: -122, top: BASE_Y - 122, width: 244, height: 244, transform: \"rotateX(90deg)\", background: \"radial-gradient(circle at 42% 30%, #6a6b72 0%, #2a2b2f 34%, #121214 70%, #060607 100%)\", boxShadow: \"inset 0 0 0 2px rgba(255,255,255,0.14), inset 0 0 26px rgba(0,0,0,0.7)\" }}\n            />\n            {/* pole */}\n            <div aria-hidden=\"true\" className=\"absolute\" style={{ left: -5, top: POLE_TOP, width: 10, height: BASE_Y - POLE_TOP, background: \"linear-gradient(90deg, #050506 0%, #2f3034 28%, #8d8e94 42%, #26272a 62%, #050506 100%)\", borderRadius: 3 }} />\n            <div aria-hidden=\"true\" className=\"absolute rounded-full\" style={{ left: -13, top: POLE_TOP - 20, width: 26, height: 26, background: \"radial-gradient(circle at 36% 30%, #b9bac0 0%, #4a4b50 28%, #141416 68%, #050506 100%)\" }} />\n            <div aria-hidden=\"true\" className=\"absolute\" style={{ left: -11, top: BASE_Y - 20, width: 22, height: 22, background: \"linear-gradient(90deg, #050506 0%, #3a3b40 30%, #8d8e94 44%, #1c1d1f 66%, #050506 100%)\", borderRadius: \"3px 3px 0 0\" }} />\n\n            <div ref={rotorRef} className=\"absolute left-0 top-0\" style={{ transformStyle: \"preserve-3d\", width: 0, height: 0 }}>\n              {/* wire hoops that carry the pockets, with spokes back to the pole */}\n              {hoops.map((y, h) => (\n                <div key={y} aria-hidden=\"true\" className=\"absolute left-0 top-0\" style={{ transformStyle: \"preserve-3d\" }}>\n                  <div className=\"absolute rounded-full\" style={{ left: -hoopR, top: y - hoopR, width: hoopR * 2, height: hoopR * 2, transform: \"rotateX(90deg)\", border: `3px solid ${WIRE}` }} />\n                  {h % 2 === 1 &&\n                    [0, 1, 2, 3].map((k) => (\n                      <div key={k} className=\"absolute\" style={{ left: -hoopR, top: y - 1.25, width: hoopR * 2, height: 2.5, background: wireGrad, transform: `rotateY(${k * 45 + 22.5}deg)` }} />\n                    ))}\n                </div>\n              ))}\n              {columns.map((c, i) => (\n                <div key={i} className=\"absolute left-0 top-0\" style={{ transformStyle: \"preserve-3d\", transform: `rotateY(${(i * 360) / N}deg) translateZ(${R}px)` }}>\n                  {[c.top, c.bottom].map((card, t) => (\n                    <div key={t} className=\"absolute left-0 top-0\" style={{ transformStyle: \"preserve-3d\" }}>\n                      <div\n                        ref={(el) => {\n                          cardRefs.current[i * 2 + t] = el;\n                        }}\n                        className=\"absolute\"\n                        style={{ left: -CW / 2, top: TIER_Y[t], width: CW, height: CH, transformOrigin: \"50% 100%\", transformStyle: \"preserve-3d\" }}\n                      >\n                        <Postcard card={card} plate={i * 2 + t + 1} live refs={shade} slot={String(i * 2 + t)} />\n                      </div>\n                      {/* the wire pocket in front of the card */}\n                      <div\n                        aria-hidden=\"true\"\n                        className=\"absolute\"\n                        style={{ left: -CW / 2 - 4, top: TIER_Y[t] + CH * 0.7, width: CW + 8, height: CH * 0.3 + 6, transform: \"translateZ(5px)\", border: `2.5px solid ${WIRE}`, borderRadius: \"3px 3px 9px 9px\", boxShadow: \"inset 0 1px 0 rgba(255,255,255,0.28), 0 3px 4px rgba(0,0,0,0.22)\" }}\n                      >\n                        <div className=\"absolute inset-x-0 top-[46%] h-[2.5px]\" style={{ background: WIRE, boxShadow: \"inset 0 1px 0 rgba(255,255,255,0.28)\" }} />\n                      </div>\n                    </div>\n                  ))}\n                </div>\n              ))}\n            </div>\n          </div>\n        </div>\n\n        <p aria-live=\"polite\" className=\"absolute bottom-5 left-5 font-mono text-[11px] uppercase leading-relaxed tracking-[0.18em] text-neutral-700 sm:bottom-8 sm:left-8\">\n          <span className=\"tabular-nums text-neutral-950\">{String(active + 1).padStart(2, \"0\")}</span>\n          <span className=\"mx-2 text-neutral-500\">/</span>\n          <span className=\"tabular-nums\">{String(N).padStart(2, \"0\")}</span>\n          <span className=\"block text-neutral-950\">{col.top.title}</span>\n          <span className=\"block text-neutral-600\">{col.bottom.title}</span>\n        </p>\n        <div className=\"absolute bottom-4 right-4 flex gap-2 sm:bottom-7 sm:right-8\">\n          <button type=\"button\" onClick={() => step(-1)} aria-label=\"Turn the rack back one column\" className={btn}>\n            <svg aria-hidden=\"true\" width=\"18\" height=\"18\" viewBox=\"0 0 20 20\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.6\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n              <path d=\"M12 4l-6 6 6 6\" />\n            </svg>\n          </button>\n          <button type=\"button\" onClick={() => step(1)} aria-label=\"Turn the rack on one column\" className={btn}>\n            <svg aria-hidden=\"true\" width=\"18\" height=\"18\" viewBox=\"0 0 20 20\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.6\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n              <path d=\"M8 4l6 6-6 6\" />\n            </svg>\n          </button>\n        </div>\n      </div>\n    </section>\n  );\n}\n"}]}
