{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"roller-conveyor-order-tracker-with-a-taped-parcel-that-rides-steel-rollers-past-four-enamel-station-signs-with-lamps","type":"registry:block","title":"Roller Conveyor Order Tracker with a Taped Parcel That Rides Steel Rollers past Four Enamel Station Signs with Lamps","description":"Order tracker drawn as a roller conveyor: a taped parcel rides steel rollers and a lamp lights on each station sign it reaches. Free React and HTML code.","dependencies":["framer-motion"],"files":[{"path":"components/we-inc/roller-conveyor-order-tracker-with-a-taped-parcel-that-rides-steel-rollers-past-four-enamel-station-signs-with-lamps.tsx","type":"registry:component","content":"import { useCallback, useEffect, useRef, useState } from \"react\";\nimport { motion, useReducedMotion, useSpring, useTransform } from \"framer-motion\";\n\n/** The order and the four places it passes. Edit the list to rename or retime the stations. */\nconst order = {\n  number: \"OT-70418\",\n  courier: \"Otterline\",\n  line: \"Line 3\",\n  stations: [\n    { name: \"Packed\", place: \"Halewick depot\", time: \"Tue 08:12\", note: \"Your parcel is packed and labelled at the Halewick depot.\" },\n    { name: \"Sorted\", place: \"Ashby hub\", time: \"Tue 21:40\", note: \"It was sorted overnight at the Ashby hub.\" },\n    { name: \"On the van\", place: \"Route 14\", time: \"Wed 07:05\", note: \"It is on the van for route 14 and due before noon.\" },\n    { name: \"Delivered\", place: \"Front porch\", time: \"Wed 11:26\", note: \"Delivered to the front porch on Wednesday at 11:26.\" },\n  ],\n};\n\n// Design pixels in the conveyor's own space: x runs along the line, y across it, z up off the floor.\nconst L = 820; // length of the line\nconst CW = 150; // width between the rails\nconst CH = 74; // height of the roller tops\nconst RAIL = 8;\nconst PITCH = 24; // one roller every 24px\nconst ROLL = 19; // roller diameter\nconst PW = 118; // the parcel: length, depth, height\nconst PD = 96;\nconst PH = 70;\nconst SIGN_W = 176;\nconst SIGN_H = 252;\nconst PLATE_H = 88;\nconst SCENE_W = 940;\nconst SCENE_H = 548;\nconst TURN = -20;\nconst TIP = 60;\nconst START = 2; // the station the parcel is waiting at when the page loads\n\nconst clamp = (v: number, lo: number, hi: number) => Math.min(hi, Math.max(lo, v));\nconst svg = (s: string) => `url(\"data:image/svg+xml,${encodeURIComponent(s)}\")`;\nconst stops = order.stations.map((_, k) => 96 + k * ((L - 192) / (order.stations.length - 1)));\nconst rollers = Array.from({ length: Math.floor((L - 6) / PITCH) }, (_, i) => 6 + i * PITCH);\n\nconst fibre = svg(\n  \"<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='f' x='0' y='0' width='100%' height='100%'><feTurbulence type='fractalNoise' baseFrequency='0.9 0.32' numOctaves='3' seed='8' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.26  0 0 0 0 0.15  0 0 0 0 0.05  0 0 0 -1.5 0.94'/></filter><rect width='220' height='220' filter='url(#f)'/></svg>\",\n);\nconst grit = svg(\n  \"<svg xmlns='http://www.w3.org/2000/svg' width='300' height='300'><filter id='g' x='0' y='0' width='100%' height='100%'><feTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='3' seed='14' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.2  0 0 0 0 0.2  0 0 0 0 0.18  0 0 0 -1.3 0.72'/></filter><rect width='300' height='300' filter='url(#g)'/></svg>\",\n);\nconst YELLOW = \"#f0b21c\";\nconst ENAMEL = \"#143a31\";\nconst kraft = (ribs: string, base: string) => ({ backgroundColor: base, backgroundImage: `${ribs}, ${fibre}`, backgroundSize: \"auto, 220px 220px\" });\nconst ribsX = \"repeating-linear-gradient(90deg, rgba(255,240,214,0.08) 0 3px, rgba(60,34,8,0.07) 3px 6px)\";\nconst ribsY = \"repeating-linear-gradient(180deg, rgba(255,240,214,0.08) 0 3px, rgba(60,34,8,0.07) 3px 6px)\";\nconst steel = \"linear-gradient(90deg, #4c5359 0%, #8d969d 14%, #e9eef2 34%, #ffffff 42%, #c3cbd1 56%, #7b848b 78%, #3d4348 100%)\";\nconst tapePaper = { backgroundColor: \"#efe6d3\", backgroundImage: fibre, backgroundSize: \"200px 200px\" };\n\nexport default function RollerConveyorTracker() {\n  const reduce = !!useReducedMotion();\n  const wrapRef = useRef<HTMLDivElement>(null);\n  const sceneRef = useRef<HTMLDivElement>(null);\n  const [step, setStep] = useState(START);\n  const [at, setAt] = useState(START); // the last station the parcel has actually reached\n  const [running, setRunning] = useState(false);\n  const [touched, setTouched] = useState(false);\n  const live = useRef({ step: START, touched: false, paused: false, timer: 0 });\n\n  const x = useSpring(stops[START] - PW / 2, { stiffness: 22, damping: 10.5, mass: 1 });\n  const parcelT = useTransform(x, (v) => {\n    const wave = (v / PITCH) * Math.PI * 2;\n    return `translate3d(${v.toFixed(2)}px, 0px, ${(CH + 1 + Math.sin(wave) * 0.5).toFixed(2)}px) rotateY(${(Math.cos(wave) * 0.35).toFixed(3)}deg)`;\n  });\n  const parcelO = useTransform(x, (v) => clamp(Math.min((v + 190) / 60, (L + 30 - v) / 70), 0, 1));\n  const shadowO = useTransform(parcelO, (o) => o * 0.6);\n  const shadowT = useTransform(x, (v) => `translate3d(${(v + 4).toFixed(2)}px, 0px, ${CH + 0.6}px)`);\n\n  useEffect(\n    () =>\n      x.on(\"change\", (v) => {\n        const moving = Math.abs(x.getVelocity()) > 6;\n        setRunning((r) => (r === moving ? r : moving));\n        const k = live.current.step;\n        if (Math.abs(v + PW / 2 - stops[k]) < 14) setAt((a) => (a === k ? a : k));\n      }),\n    [x],\n  );\n\n  const go = useCallback(\n    (k: number) => {\n      const s = live.current;\n      window.clearTimeout(s.timer);\n      const from = s.step;\n      s.step = k;\n      setStep(k);\n      const target = stops[k] - PW / 2;\n      if (reduce) {\n        x.jump(target);\n        setAt(k);\n        return;\n      }\n      if (k < from) {\n        // a new parcel: the old one runs off the end and the next is fed on at the start\n        setAt(-1);\n        x.set(L + 60);\n        s.timer = window.setTimeout(() => {\n          x.jump(-190);\n          x.set(target);\n        }, 1300);\n      } else x.set(target);\n    },\n    [reduce, x],\n  );\n\n  // self-playing demo: waits at the third station, then delivers and starts the next order\n  useEffect(() => {\n    if (reduce) return;\n    const s = live.current;\n    let id = window.setTimeout(function tick() {\n      if (s.touched) return;\n      if (!s.paused && !document.hidden) go((s.step + 1) % order.stations.length);\n      id = window.setTimeout(tick, s.step === order.stations.length - 1 ? 3600 : s.step === 0 ? 4200 : 3000);\n    }, 3500);\n    return () => {\n      window.clearTimeout(id);\n      window.clearTimeout(s.timer);\n    };\n  }, [go, reduce]);\n\n  useEffect(() => {\n    const wrap = wrapRef.current;\n    const scene = sceneRef.current;\n    if (!wrap || !scene) return;\n    const measure = () => {\n      const sc = clamp(wrap.clientWidth / (SCENE_W - 20), 0.36, 1.1);\n      wrap.style.height = `${Math.round(SCENE_H * sc)}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    return () => ro.disconnect();\n  }, []);\n\n  const pick = (k: number) => {\n    live.current.touched = true;\n    setTouched(true);\n    go(k);\n  };\n  const p3 = \"preserve-3d\" as const;\n  const stand = { transformOrigin: \"50% 100%\", transform: \"rotateX(-90deg)\" };\n\n  return (\n    <section className=\"relative overflow-hidden bg-[#dcdfdb]\">\n      <style>{`\n        @keyframes roller-conveyor-tracker-seam { 0% { transform: translateX(-4px); opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { transform: translateX(${ROLL + 1}px); opacity: 0; } }\n        @keyframes roller-conveyor-tracker-lamp { 0%, 100% { opacity: 0.55; transform: scale(1); } 50% { opacity: 1; transform: scale(1.22); } }\n        .roller-conveyor-tracker-seam { animation: roller-conveyor-tracker-seam 0.62s linear infinite; animation-play-state: paused; }\n        .roller-conveyor-tracker-on .roller-conveyor-tracker-seam { animation-play-state: running; }\n        .roller-conveyor-tracker-glow { animation: roller-conveyor-tracker-lamp 1.5s ease-in-out infinite; }\n        @media (prefers-reduced-motion: reduce) { .roller-conveyor-tracker-seam, .roller-conveyor-tracker-glow { animation: none; } }\n      `}</style>\n      <div aria-hidden=\"true\" className=\"pointer-events-none absolute inset-0\" style={{ backgroundImage: `radial-gradient(66% 60% at 46% 44%, rgba(255,255,255,0.75) 0%, rgba(255,255,255,0.2) 46%, rgba(70,80,76,0.3) 100%), ${grit}`, backgroundSize: \"auto, 300px 300px\" }} />\n\n      <div className=\"relative mx-auto w-full max-w-[1280px] pb-7 pt-6 sm:pt-10\">\n        <div ref={wrapRef} onPointerEnter={() => (live.current.paused = true)} onPointerLeave={() => (live.current.paused = false)} className=\"relative w-full overflow-hidden\" style={{ height: SCENE_H }}>\n          <div ref={sceneRef} aria-hidden=\"true\" className={`absolute left-1/2 top-0 select-none ${running ? \"roller-conveyor-tracker-on\" : \"\"}`} style={{ width: SCENE_W, height: SCENE_H, transformOrigin: \"50% 0\", transform: \"translateX(-50%)\", perspective: \"3200px\", perspectiveOrigin: \"50% 50%\" }}>\n            <div className=\"absolute\" style={{ left: 52, top: 392, width: 0, height: 0, transformStyle: p3, transformOrigin: \"0 0\", transform: `rotateX(${TIP}deg) rotateZ(${TURN}deg)` }}>\n              {/* floor: shadow under the line and a painted walkway stripe */}\n              <div className=\"absolute bg-black\" style={{ left: -6, top: 14, width: L + 60, height: CW + 60, filter: \"blur(26px)\", opacity: 0.36 }} />\n              <div className=\"absolute\" style={{ left: -40, top: CW + 70, width: L + 120, height: 12, opacity: 0.85, background: \"repeating-linear-gradient(120deg, #e9ab14 0 14px, #26292b 14px 28px)\", boxShadow: \"0 0 0 1px rgba(0,0,0,0.15)\" }} />\n\n              {/* far legs */}\n              <div className=\"absolute\" style={{ left: 0, top: -RAIL - CH, width: L, height: CH, ...stand }}>\n                {[40, 300, 560, 790].map((lx) => (\n                  <div key={lx} className=\"absolute bottom-0\" style={{ left: lx - 7, width: 14, height: CH - 20, background: \"linear-gradient(90deg, #3d4347, #7f888e 40%, #4a5055)\" }} />\n                ))}\n              </div>\n\n              {/* station signs on posts behind the line */}\n              {order.stations.map((s, k) => {\n                const lit = k <= at && k <= step;\n                const now = k === at && k === step;\n                return (\n                  <div key={s.name} className=\"absolute\" style={{ left: stops[k] - SIGN_W / 2, top: -34 - SIGN_H, width: SIGN_W, height: SIGN_H, ...stand }}>\n                    <div className=\"absolute bottom-0 left-1/2 w-[9px] -translate-x-1/2\" style={{ top: PLATE_H - 4, background: \"linear-gradient(90deg, #454b50, #b9c1c7 38%, #eef2f5 48%, #7a8389 72%, #3a4044)\" }} />\n                    <div className=\"absolute inset-x-0 top-0 overflow-hidden rounded-[7px]\" style={{ height: PLATE_H, backgroundColor: ENAMEL, backgroundImage: \"linear-gradient(168deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0.06) 22%, rgba(255,255,255,0) 46%, rgba(0,0,0,0.24) 100%)\", boxShadow: \"inset 0 0 0 2px #0b241e, inset 0 0 0 4px #f4efe2, inset 0 0 0 5px rgba(0,0,0,0.35), 0 2px 0 #0a1f1a, 0 10px 14px rgba(0,0,0,0.3)\" }}>\n                      {[\n                        [9, 9],\n                        [SIGN_W - 14, 9],\n                        [9, PLATE_H - 14],\n                        [SIGN_W - 14, PLATE_H - 14],\n                      ].map(([sx, sy]) => (\n                        <span key={`${sx}-${sy}`} className=\"absolute h-[5px] w-[5px] rounded-full\" style={{ left: sx, top: sy, background: \"radial-gradient(circle at 35% 30%, #ffffff, #9aa3a9 55%, #40464a)\" }} />\n                      ))}\n                      {/* the lamp */}\n                      <span className=\"absolute left-[17px] top-[17px] block h-[30px] w-[30px] rounded-full\" style={{ background: \"linear-gradient(145deg, #f2f4f5, #7c858b 55%, #2f3438)\", boxShadow: \"0 1px 2px rgba(0,0,0,0.6)\" }}>\n                        {now && <span className=\"roller-conveyor-tracker-glow absolute -inset-[9px] rounded-full\" style={{ background: \"radial-gradient(circle, rgba(92,255,160,0.75) 0%, rgba(92,255,160,0.25) 45%, rgba(92,255,160,0) 70%)\" }} />}\n                        <span\n                          className=\"absolute inset-[4px] rounded-full transition-[background,box-shadow] duration-300 motion-reduce:transition-none\"\n                          style={{\n                            background: lit ? \"radial-gradient(circle at 36% 30%, #f1fff6 0%, #8dffbd 22%, #25d274 52%, #0b8a48 100%)\" : \"radial-gradient(circle at 36% 30%, #6f8f82 0%, #27463d 34%, #0f251f 100%)\",\n                            boxShadow: lit ? \"0 0 10px 2px rgba(80,255,150,0.75), inset 0 -2px 3px rgba(0,60,30,0.5)\" : \"inset 0 -2px 3px rgba(0,0,0,0.6)\",\n                          }}\n                        />\n                      </span>\n                      <span className=\"absolute right-[16px] top-[15px] font-mono text-[9px] font-bold leading-none tracking-[0.18em] text-[#f4efe2]/70\">0{k + 1}</span>\n                      <span className=\"absolute left-[55px] top-[22px] whitespace-nowrap text-[15px] font-black uppercase leading-none tracking-[0.03em] text-[#f4efe2]\">{s.name}</span>\n                      <span className=\"absolute inset-x-[16px] top-[54px] h-px bg-[#f4efe2]/30\" />\n                      <span className=\"absolute inset-x-[17px] top-[62px] flex justify-between whitespace-nowrap font-mono text-[7.5px] font-semibold uppercase leading-none tracking-[0.1em] text-[#f4efe2]/90\">\n                        <span>{s.place}</span>\n                        <span>{s.time}</span>\n                      </span>\n                    </div>\n                  </div>\n                );\n              })}\n\n              {/* the dark well under the rollers, then the rollers themselves */}\n              <div className=\"absolute\" style={{ left: 0, top: 0, width: L, height: CW, transform: `translateZ(${CH - 12}px)`, background: \"#17191b\" }} />\n              <div className=\"absolute\" style={{ left: 0, top: -12, width: L, height: 12, ...stand, transform: `translateZ(${CH - 6}px) rotateX(-90deg)`, background: \"linear-gradient(180deg, #c98f10, #9a6b08)\" }} />\n              <div className=\"absolute left-0 top-0\" style={{ width: L, height: CW, transform: `translateZ(${CH}px)` }}>\n                {rollers.map((rx, i) => (\n                  <div key={rx} className=\"absolute top-0 overflow-hidden\" style={{ left: rx, width: ROLL, height: CW, borderRadius: \"2px\", background: steel, boxShadow: \"2px 0 2px rgba(0,0,0,0.5)\" }}>\n                    <span className=\"absolute inset-0\" style={{ background: \"linear-gradient(180deg, rgba(0,0,0,0.5) 0, rgba(0,0,0,0) 12px, rgba(0,0,0,0) 72%, rgba(0,0,0,0.26) 100%)\" }} />\n                    <span className=\"roller-conveyor-tracker-seam absolute inset-y-0 left-0 w-[3px]\" style={{ background: \"linear-gradient(90deg, rgba(30,36,40,0), rgba(30,36,40,0.34), rgba(255,255,255,0.4))\", animationDelay: `${-((i * 37) % 62) / 100}s` }} />\n                  </div>\n                ))}\n              </div>\n\n              {/* the parcel and the shadow it drags across the rollers */}\n              <motion.div className=\"absolute bg-black\" style={{ left: 0, top: (CW - PD) / 2 + 3, width: PW + 22, height: PD + 14, filter: \"blur(7px)\", opacity: shadowO, transform: shadowT }} />\n              <motion.div className=\"absolute left-0\" style={{ top: (CW - PD) / 2, width: PW, height: PD, transformStyle: p3, transformOrigin: \"50% 50%\", transform: parcelT, opacity: parcelO }}>\n                {/* front, end and top */}\n                <div className=\"absolute overflow-hidden\" style={{ left: 0, top: PD - PH, width: PW, height: PH, ...stand, ...kraft(ribsX, \"#c39a64\") }}>\n                  <svg viewBox=\"0 0 74 22\" className=\"absolute bottom-[9px] left-[9px] h-[20px] w-[68px]\" fill=\"none\" stroke=\"#4a3015\" strokeWidth=\"1.6\" strokeLinejoin=\"round\" strokeLinecap=\"round\" opacity=\"0.8\">\n                    <rect x=\"1\" y=\"1\" width=\"20\" height=\"20\" />\n                    <path d=\"M7.5 17V7M4.8 9.6 7.5 6.5l2.7 3.1M14.5 17V7M11.8 9.6l2.7-3.1 2.7 3.1\" />\n                    <rect x=\"27\" y=\"1\" width=\"20\" height=\"20\" />\n                    <path d=\"M32.5 5h9l-1 5.6a3.5 3.5 0 0 1-7 0zM37 13.6V17M34 17.4h6\" />\n                    <rect x=\"53\" y=\"1\" width=\"20\" height=\"20\" />\n                    <path d=\"M56.5 12a6.5 6.5 0 0 1 13 0zM63 12v4.6a1.8 1.8 0 0 1-3.6 0\" />\n                  </svg>\n                  <span className=\"absolute right-[8px] top-[9px] text-right text-[10px] font-black uppercase leading-none tracking-[0.04em] text-[#4a3015]/80\">{order.courier}</span>\n                  <span className=\"absolute inset-0\" style={{ background: \"linear-gradient(180deg, rgba(255,244,222,0.24) 0, rgba(255,244,222,0) 5px, rgba(40,22,4,0.06) 55%, rgba(40,22,4,0.3) 100%)\", boxShadow: \"inset 0 0 0 1px rgba(90,58,22,0.3)\" }} />\n                </div>\n                <div className=\"absolute overflow-hidden\" style={{ left: PW - PH, top: 0, width: PH, height: PD, transformOrigin: \"100% 50%\", transform: \"rotateY(90deg)\", ...kraft(ribsY, \"#a47c4b\") }}>\n                  <span className=\"absolute left-0 block\" style={{ top: PD / 2 - 11, width: 24, height: 22, ...tapePaper, boxShadow: \"inset 0 0 0 0.5px rgba(90,58,22,0.4)\" }} />\n                  <span className=\"absolute inset-0\" style={{ background: \"linear-gradient(90deg, rgba(255,244,222,0.14) 0, rgba(255,244,222,0) 5px, rgba(40,22,4,0.12) 50%, rgba(40,22,4,0.36) 100%)\", boxShadow: \"inset 0 0 0 1px rgba(90,58,22,0.3)\" }} />\n                </div>\n                <div className=\"absolute left-0 top-0 overflow-hidden\" style={{ width: PW, height: PD, transform: `translateZ(${PH}px)`, ...kraft(ribsX, \"#cba570\") }}>\n                  <span className=\"absolute inset-x-0 top-1/2 block h-px\" style={{ background: \"rgba(60,34,8,0.5)\" }} />\n                  <span className=\"absolute inset-x-0 block overflow-hidden\" style={{ top: PD / 2 - 11, height: 22, ...tapePaper, boxShadow: \"inset 0 0 0 0.5px rgba(90,58,22,0.4)\" }}>\n                    <span className=\"absolute left-0 top-1/2 -translate-y-1/2 whitespace-nowrap font-mono text-[6px] font-bold uppercase leading-none tracking-[0.2em] text-[#c5311f]\">{`${order.courier} / tracked / `.repeat(4)}</span>\n                  </span>\n                  <span className=\"absolute overflow-hidden rounded-[1px] bg-[#fbfaf5]\" style={{ left: 8, top: PD / 2 + 14, width: 62, height: 27, transform: \"rotate(-2deg)\", boxShadow: \"0 0 0 0.5px rgba(40,22,4,0.4)\" }}>\n                    <span className=\"absolute left-[4px] top-[4px] bg-neutral-900 px-[3px] py-[1.5px] text-[4.5px] font-black uppercase leading-none tracking-[0.1em] text-white\">{order.courier}</span>\n                    <span className=\"absolute bottom-[4px] left-[4px] h-[9px] w-[36px]\" style={{ background: \"repeating-linear-gradient(90deg, #171717 0 1px, #fbfaf5 1px 2px, #171717 2px 4px, #fbfaf5 4px 5px, #171717 5px 6px, #fbfaf5 6px 8.5px)\" }} />\n                    <span className=\"absolute right-[4px] top-[5px] text-[11px] font-black leading-none text-neutral-900\">14</span>\n                  </span>\n                  <span className=\"absolute inset-0\" style={{ background: \"linear-gradient(128deg, rgba(255,246,226,0.26) 0%, rgba(255,246,226,0) 44%, rgba(40,22,4,0.1) 100%)\", boxShadow: \"inset 0 0 0 1px rgba(90,58,22,0.28)\" }} />\n                </div>\n              </motion.div>\n\n              {/* rail tops, the near rail with its bolts and legs, and the end of the line */}\n              <div className=\"absolute\" style={{ left: -4, top: -RAIL, width: L + 12, height: RAIL, transform: `translateZ(${CH + 6}px)`, background: \"linear-gradient(180deg, #ffd35a, #e5a512)\" }} />\n              <div className=\"absolute\" style={{ left: -4, top: CW, width: L + 12, height: RAIL, transform: `translateZ(${CH + 6}px)`, background: \"linear-gradient(180deg, #ffe07c, #f4b722)\", boxShadow: \"inset 0 1px 0 rgba(255,255,255,0.6)\" }} />\n              <div className=\"absolute\" style={{ left: -4, top: CW + RAIL - (CH + 6), width: L + 12, height: CH + 6, ...stand }}>\n                {[44, 304, 564, 794].map((lx) => (\n                  <div key={lx} className=\"absolute bottom-0\" style={{ left: lx - 8, width: 16, top: 30, background: \"linear-gradient(90deg, #4b5257, #b2bbc1 30%, #e8edf0 44%, #848d93 70%, #41474b)\" }}>\n                    <span className=\"absolute -inset-x-[9px] bottom-0 h-[5px]\" style={{ background: \"linear-gradient(180deg, #c6cdd2, #5b6267)\" }} />\n                  </div>\n                ))}\n                <div className=\"absolute inset-x-[44px] h-[5px]\" style={{ top: CH - 14, background: \"linear-gradient(180deg, #dfe4e8, #7c858b 60%, #4a5055)\" }} />\n                <div className=\"absolute inset-x-0 top-0 h-[30px]\" style={{ backgroundColor: YELLOW, backgroundImage: `linear-gradient(180deg, rgba(255,255,255,0.5) 0, rgba(255,255,255,0.12) 3px, rgba(255,255,255,0) 9px, rgba(120,70,0,0) 62%, rgba(120,70,0,0.34) 100%), ${grit}`, backgroundSize: \"auto, 300px 300px\", boxShadow: \"inset 0 0 0 1px rgba(110,64,0,0.4), 0 3px 4px rgba(0,0,0,0.25)\" }}>\n                  {rollers.map((rx) => (\n                    <span key={rx} className=\"absolute top-[9px] h-[9px] w-[9px] rounded-full\" style={{ left: rx + 4 + ROLL / 2 - 4.5, background: \"radial-gradient(circle at 36% 30%, #ffffff 0%, #b8c0c6 30%, #5a6166 70%, #2a2e31 100%)\", boxShadow: \"0 1px 1px rgba(80,44,0,0.6)\" }} />\n                  ))}\n                  <span className=\"absolute left-[172px] top-[19px] whitespace-nowrap bg-[#1c1e20] px-[5px] py-[2px] font-mono text-[5.5px] font-bold uppercase leading-none tracking-[0.2em] text-[#f0b21c]\">\n                    {order.courier} / {order.line}\n                  </span>\n                </div>\n              </div>\n              <div className=\"absolute\" style={{ left: L + 8 - 30, top: -RAIL, width: 30, height: CW + RAIL * 2, transformOrigin: \"100% 50%\", transform: `translateZ(${CH - 24}px) rotateY(90deg)`, background: \"linear-gradient(180deg, #b47c08, #d99b12 12%, #c98f10 88%, #9a6b08)\", boxShadow: \"inset 0 0 0 1px rgba(110,64,0,0.5)\" }} />\n            </div>\n          </div>\n        </div>\n\n        {/* the same four steps as real, full-size controls */}\n        <div className=\"relative mx-auto mt-2 w-full max-w-4xl px-4 sm:px-8\">\n          <p aria-live={touched ? \"polite\" : \"off\"} className=\"font-mono text-[11px] uppercase leading-relaxed tracking-[0.16em] text-neutral-700\">\n            <span className=\"font-bold text-neutral-900\">Order {order.number}</span>\n            <span className=\"block normal-case tracking-normal sm:text-[13px]\">{order.stations[step].note}</span>\n          </p>\n          <ol className=\"mt-4 grid grid-cols-2 gap-2 sm:grid-cols-4\">\n            {order.stations.map((s, k) => (\n              <li key={s.name}>\n                <button\n                  type=\"button\"\n                  onClick={() => pick(k)}\n                  aria-current={k === step ? \"step\" : undefined}\n                  className={`flex min-h-[48px] w-full items-center gap-3 rounded-[8px] border px-3 text-left outline-none transition-colors duration-200 focus-visible:ring-4 focus-visible:ring-emerald-900/40 motion-reduce:transition-none ${k === step ? \"border-[#143a31] bg-[#143a31] text-[#f4efe2]\" : \"border-neutral-400 bg-white/60 text-neutral-800 hover:bg-white\"}`}\n                >\n                  <span aria-hidden=\"true\" className={`h-[10px] w-[10px] shrink-0 rounded-full ${k <= step ? \"bg-emerald-400 shadow-[0_0_0_2px_rgba(16,185,129,0.3)]\" : \"border border-neutral-500 bg-transparent\"}`} />\n                  <span>\n                    <span className=\"block text-[13px] font-bold leading-tight\">{s.name}</span>\n                    <span className={`block font-mono text-[10px] leading-tight ${k === step ? \"text-[#f4efe2]/80\" : \"text-neutral-600\"}`}>{k <= step ? s.time : \"Pending\"}</span>\n                  </span>\n                </button>\n              </li>\n            ))}\n          </ol>\n        </div>\n      </div>\n    </section>\n  );\n}\n"}]}
