[data-conveyor-loading] .motion-scene .hero-dish {
  visibility: hidden;
}

.motion-plates {
  display: grid;
  grid-area: 1 / 1;
  place-items: center;
  align-self: stretch;
  width: 100%;
  min-width: 0;
  position: relative;
  pointer-events: none;
}

.motion-plates > .belt-plate {
  grid-area: 1 / 1;
}

.motion-plates > .belt-plate[hidden] {
  display: none;
}

.motion-scene[data-conveyor] .hero-dish figcaption {
  z-index: 3;
  inline-size: min(250px, 92%);
}

@media (orientation: landscape) and (min-width: 651px) and (max-height: 460px) {
  .motion-scene[data-conveyor] .hero-dish figcaption {
    inline-size: min(195px, 92%);
  }
}

@media (max-width: 650px) {
  .motion-plates {
    position: absolute;
    inset: 0;
  }

  .motion-scene[data-conveyor] .motion-plates > .belt-plate {
    height: 102%;
  }

  .motion-scene[data-conveyor] .hero-dish figcaption {
    inline-size: min(208px, 85%);
  }
}

.motion-plates > .belt-plate {
  filter: none;
  transform: rotate(-7deg) scale(.98);
}

.motion-scene .table-linen {
  height: 185%;
  left: 20.5%;
  top: -42.5%;
}

@media (min-width: 981px) and (min-height: 461px) {
  .motion-scene .hero-dish {
    --plate-x: clamp(55px, 7.6vw, 120px);
    --plate-y: clamp(-120px, -8vw, -72px);
  }

  .motion-scene .table-linen,
  .motion-plates > .belt-plate {
    translate: var(--plate-x) var(--plate-y);
  }

  .motion-plates > .belt-plate {
    width: min(80%, 465px);
  }
}

.motion-plates {
  filter: drop-shadow(2px 10px 11px #08251960);
}

.hero-dish figcaption {
  max-width: calc(100% - 18px);
}

.menu-photo .meal-card-plate {
  position: absolute;
  width: 71%;
  aspect-ratio: 1;
  right: -2%;
  top: -7%;
  border-radius: 50%;
  background: radial-gradient(circle closest-side, #ebe7df 65%, #e1ded6 80%, #faf8f4 92%, #dcd9d0 99%);
  box-shadow: 1px 6px 7px #25382c37, inset 0 1px 4px #fff;
  overflow: hidden;
}

.meal-card-food {
  position: absolute;
  inset: 9%;
  border-radius: 50%;
  overflow: hidden;
  mask-image: radial-gradient(circle closest-side, #000 93%, transparent 100%);
}

.menu-photo .meal-card-food img {
  position: absolute;
  width: var(--crop-width);
  max-width: none;
  left: 50%;
  top: 50%;
  right: auto;
  height: auto;
  transform: translate(calc(-1 * var(--crop-x)), calc(-1 * var(--crop-y)));
  filter: none;
}

@media (max-width: 800px) {
  .menu-photo .meal-card-plate { width: 91%; top: -7%; }
}

@media (max-width: 650px) {
  .motion-scene .table-linen {
    width: 30%;
    height: max(240%, 900px);
    left: 35%;
    top: calc(47% - 6px - max(120%, 450px));
    transform: rotate(65deg);
    translate: 20px 0;
  }

  .motion-plates > .belt-plate {
    transform: translate(-50%, calc(-50% + 3px)) rotate(-7deg) scale(.97);
    translate: 20px -9px;
  }

  .hero-dish figcaption { max-width: 85%; }
  .menu-photo .meal-card-plate { width: 93%; top: -7%; right: -7%; }
}

@media (max-width: 480px) {
  .motion-scene .hero-dish {
    --belt-drop: clamp(0px, calc((480px - 100vw) * .4), 39px);
  }

  .motion-scene .table-linen {
    translate: 20px var(--belt-drop);
  }

  .motion-plates > .belt-plate {
    transform: translate(-50%, calc(-50% + 3px)) rotate(-7deg) scale(.90);
    translate: 20px calc(-9px + var(--belt-drop));
  }
}

.menu-photo:has(.meal-card-plate) figcaption { max-width: 90%; }


/* The slats move along the diagonal; the side rails stay fixed. */
.motion-scene .table-linen {
  overflow: hidden;
  background: #d9d9a9;
  border: 0;
  box-shadow: -5px 8px 12px #06271d66, 3px 1px 0 #879268;
}
.motion-scene .hero-layout { clip-path: inset(0 -100vw); }
.motion-scene .table-linen[data-mesh="ready"] {
  overflow: visible;
  background: none;
  box-shadow: none;
}
.table-linen[data-mesh="ready"] :is(.belt-tread,.belt-rails) { visibility: hidden; }
.conveyor-mesh {
  position: absolute;
  top: 0;
  left: 50%;
  width: calc(100% + 152px);
  height: 100%;
  transform: translateX(-50%);
  pointer-events: none;
  filter: drop-shadow(2px 9px 8px #06271d85);
}
.belt-tread {
  position: absolute;
  inset: -96px 0;
  background:
    linear-gradient(90deg,#697d5b57,transparent 16%,#fff8d852 44%,transparent 68%,#596b4a49),
    repeating-linear-gradient(180deg,
      #a4a882 0 2px, #f7eac0 2px 4px, #e4dfb4 4px 34px, #bdc096 34px 43px, #8b9671 43px 46px, #596f50 46px 48px);
  transform: translate3d(0,0,0);
  pointer-events: none;
}
.belt-rails {
  position: absolute;
  inset: 0;
  border-inline: clamp(7px, 2vw, 25px) solid transparent;
  border-image: linear-gradient(90deg,#829169 0%,#c2c69c 2%,#e0dcb2 4%,#6d815b 6%,#617851 94%,#e0dcb2 96%,#bdc49a 98%,#7e8c66 100%) 1;
  pointer-events: none;
}
.belt-rails::before, .belt-rails::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: clamp(5px, 1vw, 13px);
  background: radial-gradient(circle at center,#657658 0 16%,#c5cba2 22% 27%,#4f664b 33%,transparent 37%) center top / 100% 96px repeat-y;
}
.belt-rails::before { right: calc(100% + 2px); }
.belt-rails::after { left: calc(100% + 2px); }

.motion-plates > .belt-plate {
  position: relative;
  z-index: 1;
  width: min(109%,650px);
  aspect-ratio: 1;
  transform: rotate(-7deg);
}
.belt-plate > img, .belt-plate > canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
}
.belt-plate[data-model="on"] > img { visibility: hidden; }
.motion-scene[data-conveyor] .motion-plates { filter: none; }
.motion-scene[data-conveyor] .belt-plate { filter: drop-shadow(3px 11px 10px #08251970); }
@media (max-width: 980px) {
  .motion-plates > .belt-plate { width: 114%; }
}
@media (min-width: 981px) and (min-height: 461px) {
  .motion-plates > .belt-plate { width: min(80%,465px); }
}
@media (max-width: 650px) {
  .motion-plates > .belt-plate {
    position: absolute;
    left: 50%;
    top: 47%;
    width: auto;
    height: 102%;
    max-width: 84%;
    transform: translate(-50%,-50%) rotate(-7deg);
  }
}
@media (orientation: landscape) and (min-width: 651px) and (max-height: 460px) {
  .motion-plates > .belt-plate { width: 105%; max-height: 104%; }
}

.plate-oatmeal .meal-card-food { --crop-width: 151%; --crop-x: 50%; --crop-y: 50%; }
.plate-grilledcheese .meal-card-food { --crop-width: 138%; --crop-x: 50%; --crop-y: 50%; }
.plate-peanutnoodles .meal-card-food { --crop-width: 159%; --crop-x: 50%; --crop-y: 50%; }

.hero-dish figcaption .meal-label-title {
  font: inherit;
  color: inherit;
  margin: 0;
  letter-spacing: normal;
  text-transform: none;
}

.hero-dish figcaption .protein-hit {
  position: absolute;
  right: 0;
  bottom: 100%;
  display: flex;
  align-items: center;
  gap: 5px 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: max-content;
  margin: 0 0 4px;
  padding: 5px 9px;
  border-radius: 5px;
  background: var(--deep);
  color: var(--paper);
  font: 650 11px/1.2 var(--body);
  letter-spacing: 0;
  text-transform: none;
}

.protein-hit strong { color: var(--butter); }

.footer-motion {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-block: -12px;
  min-height: 36px;
  cursor: pointer;
}

.footer-motion[hidden] { display: none; }
.footer-motion input { accent-color: var(--butter); }

.motion-scene .table-edge::before {
  position: absolute;
  right: 0;
  bottom: 100%;
  left: 0;
  height: 14px;
  pointer-events: none;
  content: "";
  opacity: 0;
  background: linear-gradient(transparent, #06241a42);
  transition: opacity 160ms ease-out;
}

.motion-scene[data-conveyor] .table-edge::before { opacity: 1; }

