:root { --warehouse-motion: paused; }
:root[data-motion="running"] { --warehouse-motion: running; }

.delivery-scene,
.parcel-scene {
  position: relative;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
}

.delivery-scene {
  flex: 0 0 92px;
  margin: auto 0 4px;
  border-radius: 0 0 9px 9px;
  background: linear-gradient(180deg, transparent 6%, #eef2e8 78%, #e5eadd);
}

.delivery-world {
  --trip: 7.2s;
  --trip-start: -2.4s;
  position: absolute;
  inset: auto 0 0;
  height: 85px;
  container-type: inline-size;
}

.delivery-world span,
.delivery-world i,
.parcel-scene span,
.parcel-scene i { position: absolute; display: block; }

.yard-skyline {
  inset: 11px 0 12px;
  background: #d9e3d7;
  clip-path: polygon(0 69%, 10% 69%, 10% 50%, 22% 50%, 22% 64%, 27% 64%, 27% 44%,
    38% 36%, 38% 58%, 48% 49%, 48% 64%, 63% 64%, 63% 37%, 72% 37%, 72% 67%,
    88% 67%, 88% 56%, 100% 56%, 100% 100%, 0 100%);
}

.loading-bay {
  right: 9px;
  bottom: 19px;
  width: 51px;
  height: 30px;
  border: 1px solid #9fac98;
  border-top: 0;
  border-radius: 2px 2px 0 0;
  background: repeating-linear-gradient(90deg, #dae2cc 0 5px, #c3cfb7 5px 6px);
}
.loading-bay::before {
  content: "";
  position: absolute;
  inset: -4px -3px auto;
  height: 6px;
  border-radius: 2px;
  background: #658573;
  box-shadow: inset 0 2px #96aa94;
}
.bay-door {
  inset: 7px 9px 0;
  border: 2px solid #536f62;
  border-bottom: 0;
  background: repeating-linear-gradient(0deg, #8b9b88 0 3px, #6e8978 3px 4px);
}
.yard-road {
  inset: auto 0 0;
  height: 20px;
  border-top: 2px solid #a9b8a4;
  background: #dce3d4;
}
.yard-road::after {
  content: "";
  position: absolute;
  inset: 10px 0 auto;
  height: 2px;
  background: repeating-linear-gradient(90deg, #f9faec 0 12px, transparent 12px 29px);
}
.bay-carton {
  right: 13px;
  bottom: 18px;
  width: 10px;
  height: 9px;
  border: 1px solid #ad8c57;
  background: linear-gradient(90deg, #cfab70 36%, #f1dfb3 36% 62%, #cfab70 62%);
  transform-origin: bottom;
  animation: unload-carton var(--trip) linear var(--trip-start) infinite both;
}

.delivery-truck {
  left: 0;
  bottom: 12px;
  width: 62px;
  height: 32px;
  animation: drive-to-bay var(--trip) cubic-bezier(.32, 0, .28, 1) var(--trip-start) infinite both;
}
.delivery-truck::before {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 3px;
  width: 56px;
  height: 4px;
  border-radius: 50%;
  background: #304e4638;
}
.van-chassis {
  inset: auto 1px 4px 1px;
  height: 7px;
  border-radius: 2px 3px 2px 2px;
  background: #304b41;
  box-shadow: inset 0 -2px #243d34;
}
.van-box {
  left: 0;
  bottom: 9px;
  width: 39px;
  height: 23px;
  border: 1px solid #2a5144;
  border-radius: 3px 2px 1px 1px;
  background: linear-gradient(0deg, #345e4d 0 2px, #507d62 2px 5px, #42725d 5px 100%);
  box-shadow: inset 1px 1px #789880;
}
.van-box::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 9px;
  width: 16px;
  height: 7px;
  background: #ecdeb2;
  clip-path: polygon(0 19%, 54% 19%, 54% 0, 100% 48%, 54% 100%, 54% 78%, 0 78%, 20% 48%);
}
.van-box::after {
  content: "";
  position: absolute;
  inset: 3px 3px 3px auto;
  width: 1px;
  background: #2d594a;
}
.van-cab {
  right: 0;
  bottom: 7px;
  width: 23px;
  height: 21px;
  background: linear-gradient(0deg, #597860 0 3px, #a5b59a 3px 5px, #e3e5cd 5px);
  clip-path: polygon(0 0, 50% 0, 78% 40%, 94% 48%, 100% 61%, 100% 94%, 86% 100%, 0 100%);
}
.van-cab::before {
  content: "";
  position: absolute;
  inset: 2px 5px 10px 3px;
  background: linear-gradient(120deg, #34574e 25%, #64827a 58%, #486b60 59%);
  clip-path: polygon(0 0, 50% 0, 100% 100%, 0 100%);
}
.van-cab::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 12px;
  width: 4px;
  height: 2px;
  border-radius: 1px;
  background: #557263;
  box-shadow: 16px 1px #e6bb67;
}
.van-wheel {
  bottom: 0;
  width: 10px;
  height: 10px;
  border: 2.5px solid #293f37;
  border-radius: 50%;
  background: linear-gradient(90deg, #f4f1de 42%, #8c9b8b 42% 63%, #d3dcca 63%);
  animation: van-wheels var(--trip) cubic-bezier(.32, 0, .28, 1) var(--trip-start) infinite both;
}
.van-wheel.rear { left: 7px; }
.van-wheel.front { right: 5px; }

@keyframes drive-to-bay {
  0% { transform: translateX(-64px); }
  43%, 62% { transform: translateX(calc(100cqw - 100px)); }
  96%, 100% { transform: translateX(calc(100cqw + 3px)); }
}
@keyframes van-wheels {
  0% { transform: rotate(0turn); }
  43%, 62% { transform: rotate(3turn); }
  96%, 100% { transform: rotate(6turn); }
}
@keyframes unload-carton {
  0%, 43%, 100% { opacity: 0; transform: translate(-5px, -3px); }
  58%, 89% { opacity: 1; transform: translate(0, 0); }
  99% { opacity: 0; transform: translate(0, 0); }
}

.parcel-scene {
  --journey: 11s;
  container-type: inline-size;
  justify-self: stretch;
  height: 48px;
  width: 100%;
}
.parcel-scene > * { position: absolute; display: block; }
.order-phone { left: 0; bottom: 4px; width: 29px; height: 40px; z-index: 2; }
.order-phone svg, .courier-trip svg { display: block; width: 100%; height: 100%; overflow: visible; }
.packing-rail {
  left: 23px; width: calc(60% - 19px); bottom: 8px; height: 7px; border: 1px solid #8da693; border-radius: 5px;
  background: #dbe6d9; overflow: hidden;
}
.packing-rail::before {
  content: ""; position: absolute; inset: 0 -10px;
  background: radial-gradient(circle at 4px 50%, #759080 0 1px, #f3f6ee 1.3px 2px, transparent 2.2px) 0 0 / 10px 100%;
  animation: belt-roll .8s linear infinite;
  animation-play-state: var(--warehouse-motion);
}
.scan-arch {
  bottom: 15px; left: 36%; width: 22px; height: 24px; transform: translateX(-50%);
  border: solid #668570; border-width: 5px 2px 0; border-radius: 3px 3px 0 0;
  background: #ecf3e855;
}
.scan-arch::after { content:""; position:absolute; right:1px; top:-3.5px; width:4px; height:1.5px; background:#ecd395; }
.scan-light { left: 36%; bottom: 15px; height: 20px; width: 2px; background:#d5a357; box-shadow:0 0 3px #e7ba6c; }
.delivery-road {
  bottom:8px; left:60%; right:0; height:1px; background:#b4c6b7;
}
.delivery-road::after { content:""; position:absolute; top:3px; left:3%; right:0; height:1px; background:repeating-linear-gradient(90deg,#d7e2d8 0 9px,transparent 9px 20px); }
.journey-box {
  z-index: 1; left:0; bottom:15px; width:20px; height:14px; border:1px solid #a08050; border-radius:1px;
  background:linear-gradient(90deg,#d2ae79 40%,#f0dbaf 40% 61%,#d2ae79 61%);
}
.journey-box::before, .journey-box::after {content:""; position:absolute;}
.journey-box::before {inset:-5px -1px auto;height:4px;transform:skewX(-45deg);transform-origin:bottom left;background:linear-gradient(90deg,#e3c698 40%,#f4e4c4 40% 61%,#e3c698 61%);}
.journey-box::after {top:-1px;bottom:-1px;left:100%;width:4px;transform:skewY(-45deg);transform-origin:bottom left;background:#b18c5d;}
.journey-box i {left:2px;bottom:2px;width:6px;height:4px;background:repeating-linear-gradient(90deg,#738476 0 1px,#f2ebd8 1px 2px);}
.courier-trip { left:0; bottom:8px; width:61px; height:39px; z-index:2; }
.phone-order { animation: phone-cart var(--journey) linear infinite both; }
.phone-confirm { animation: phone-check var(--journey) linear infinite both; }
.journey-box { animation: pack-to-rider var(--journey) linear infinite both; }
.scan-light { animation: scan-item var(--journey) linear infinite both; }
.courier-trip { animation: take-delivery var(--journey) ease-in-out infinite both; }
.hand-reach { animation: receive-item var(--journey) linear infinite both; }
.loaded-box { animation: load-bike var(--journey) linear infinite both; }
@keyframes phone-cart {0%,7%,88%,100%{opacity:1} 10%,84%{opacity:0}}
@keyframes phone-check {0%,7%,88%,100%{opacity:0} 10%,84%{opacity:1}}
@keyframes pack-to-rider {
  0%,9%{opacity:0;transform:translate(23px,-2px) scale(.86)}
  14%{opacity:1;transform:translate(27px,0) scale(1)}
  36%,40%{opacity:1;transform:translate(calc(36cqw - 10px),0)}
  55%{opacity:1;transform:translate(calc(60cqw - 17px),0)}
  60%{opacity:1;transform:translate(calc(60cqw + 1px),-5px) scale(.86)}
  61%,100%{opacity:0;transform:translate(calc(60cqw + 1px),-5px) scale(.86)}
}
@keyframes scan-item {0%,33%,44%,100%{opacity:0} 36%,40%{opacity:1}}
@keyframes receive-item {0%,49%,66%,100%{opacity:0} 53%,61%{opacity:1}}
@keyframes load-bike {0%,59.8%,96%,100%{opacity:0} 61%,92%{opacity:1}}
@keyframes take-delivery {
  0%,63%{opacity:1;transform:translateX(60cqw)}
  85%{opacity:1;transform:translateX(calc(100cqw - 52px))}
  92%,94%{opacity:0;transform:translateX(100cqw)}
  95%{opacity:0;transform:translateX(60cqw)}
  100%{opacity:1;transform:translateX(60cqw)}
}
@keyframes belt-roll {to{transform:translateX(10px)}}
.journey-box,.scan-light,.courier-trip,.phone-order,.phone-confirm,.hand-reach,.loaded-box { animation-delay:-2.2s; }
.delivery-truck, .van-wheel, .bay-carton, .journey-box, .scan-light, .courier-trip, .phone-order, .phone-confirm, .hand-reach, .loaded-box {
  animation-play-state: var(--warehouse-motion);
}
@container (max-width:240px) {
  .courier-trip {width:44px;height:29px;}
  .order-phone {width:22px;height:32px;}
  .packing-rail {left:18px;width:calc(60% - 15px);}
  .journey-box {width:15px;height:11px;}
}
@media (prefers-reduced-motion: reduce) {
  :root[data-motion] { --warehouse-motion: paused; }
}
@media (max-width: 700px) {
  .delivery-scene {
    grid-column: 2; grid-row: 1;
    width: 100%; max-width: 136px; height: 41px; margin: 0;
    justify-self: center; border-radius: 5px;
  }
  .delivery-world { width: 166.6667%; right: auto; transform: scale(.6); transform-origin: left bottom; }
}
