/* The material is packed, then travels out of the work area. */
body[data-mission="2"] #rf-stage:is([data-mechanic="packing-share"],[data-mechanic="packing-missing"],[data-mechanic="lift-final"])[data-solved="true"] .rf-machine-success {
  position:absolute;
  inset:auto;
  top:var(--rf-delivery-praise-top, 1rem);
  left:50%;
  z-index:10;
  max-width:calc(100% - 2rem);
}
body[data-mission="2"] #rf-stage:is([data-mechanic="packing-share"],[data-mechanic="packing-missing"])[data-solved="true"] .rf-share-box {
  transform-origin:center bottom;
  animation:rf-packed-box-away 3.2s ease-in-out both;
}
body[data-mission="2"] #rf-stage:is([data-mechanic="packing-share"],[data-mechanic="packing-missing"])[data-solved="true"] .rf-share-box:nth-child(3n + 2) {animation-delay:.1s}
body[data-mission="2"] #rf-stage:is([data-mechanic="packing-share"],[data-mechanic="packing-missing"])[data-solved="true"] .rf-share-box:nth-child(3n) {animation-delay:.2s}
body[data-mission="2"] #rf-stage:is([data-mechanic="packing-share"],[data-mechanic="packing-missing"])[data-solved="true"] .rf-share-box-target:disabled,
body[data-mission="2"] #rf-stage:is([data-mechanic="packing-share"],[data-mechanic="packing-missing"])[data-solved="true"] .rf-share-piece:disabled {opacity:1}
@keyframes rf-packed-box-away {
  0%,15% {transform:translate(0,0) scale(1);opacity:1}
  38%,55% {transform:translate(0,-7px) scale(1.035);opacity:1;box-shadow:0 0 0 3px #69c690,0 7px 16px #153d3155}
  100% {transform:translateX(110vw) scale(1.035);opacity:0}
}
/* The complete order rises toward the shipping lift before the finale. */
body[data-mission="2"] #rf-stage[data-mechanic="lift-final"][data-solved="true"] .rf-lift-plan {
  position:relative;
  z-index:2;
  transform-origin:center center;
  animation:rf-order-lift-away 3.2s ease-in-out both;
}
@keyframes rf-order-lift-away {
  0%,18% {transform:translateY(0) scale(1);opacity:1}
  40%,65% {transform:translate(var(--rf-success-x, 0px),var(--rf-success-y, 0px)) scale(var(--rf-success-scale, 1));opacity:1;box-shadow:0 0 0 4px #f0ce76,0 8px 22px #1d413d88}
  100% {transform:translate(var(--rf-success-x, 0px),calc(var(--rf-success-y, 0px) - 110vh)) scale(var(--rf-success-scale, 1));opacity:0}
}
@media(prefers-reduced-motion:reduce) {
  body[data-mission="2"] #rf-stage:is([data-mechanic="packing-share"],[data-mechanic="packing-missing"])[data-solved="true"] .rf-share-box,
  body[data-mission="2"] #rf-stage[data-mechanic="lift-final"][data-solved="true"] .rf-lift-plan {animation:none}
}

/* The confirmation remains visible beside the answer even on long tasks. */
body[data-mission="2"] #rf-stage[data-solved="true"] .rf-feedback[data-kind="correct"] {
  border-radius:8px;
  animation:rf-visible-feedback 1s ease-out both;
}
@keyframes rf-visible-feedback {
  0% {transform:scale(.98);box-shadow:0 0 0 0 #72bd8a00}
  45% {transform:scale(1.015);box-shadow:0 0 0 4px #72bd8a66}
  100% {transform:scale(1);box-shadow:0 0 0 0 #72bd8a00}
}
@media(prefers-reduced-motion:reduce) {
  body[data-mission="2"] #rf-stage[data-solved="true"] .rf-feedback[data-kind="correct"] {animation:none}
}
