/* Joint-driven human gestures; grounded legs and real UI remain in the same rig. */
#workflow.ms-scene-products [data-story-scene="1"] .ms-actor-doctor { opacity: 1; }
#workflow.ms-scene-products .mc-head,
#workflow.ms-scene-products .mc-forearm,
#workflow.ms-scene-products .mc-eyes {
  animation-play-state: paused;
  animation-iteration-count: infinite;
  animation-timing-function: ease-in-out;
}

#workflow.ms-scene-products .mc-head,
#workflow.ms-scene-products .mc-forearm {
  transform-box: view-box;
  transform-origin: var(--mc-pivot-x, 0px) var(--mc-pivot-y, 0px);
}

#workflow.ms-scene-products .mc-eyes {
  transform-box: fill-box;
  transform-origin: center;
  animation-name: mc-blink;
  animation-duration: 4.8s;
}

#workflow.ms-scene-products .ms-actor-doctor .mc-eyes {
  animation-duration: 5.7s;
  animation-delay: .9s;
}

#workflow.ms-scene-products[data-motion="running"] .mate-scene:not([hidden]) .mc-head,
#workflow.ms-scene-products[data-motion="running"] .mate-scene:not([hidden]) .mc-forearm,
#workflow.ms-scene-products[data-motion="running"] .mate-scene:not([hidden]) .mc-eyes {
  animation-play-state: running;
}

#workflow.ms-scene-products[data-story-beat="0"] [data-story-scene="0"]:not([hidden]) .mc-phone-arm,
#workflow.ms-scene-products[data-story-beat="1"] [data-story-scene="0"]:not([hidden]) .mc-phone-arm,
#workflow.ms-scene-products[data-story-beat="1"] [data-story-scene="3"]:not([hidden]) .mc-phone-arm {
  animation-name: mc-phone-use;
  animation-duration: 1.8s;
}

#workflow.ms-scene-products[data-story-beat="0"] [data-story-scene="0"]:not([hidden]) .mc-head,
#workflow.ms-scene-products[data-story-beat="2"] [data-story-scene="0"]:not([hidden]) .mc-head,
#workflow.ms-scene-products[data-story-beat="0"] [data-story-scene="3"]:not([hidden]) .mc-head,
#workflow.ms-scene-products[data-story-beat="2"] [data-story-scene="3"]:not([hidden]) .mc-head {
  animation-name: mc-listen-nod;
  animation-duration: 2.8s;
}

#workflow.ms-scene-products[data-story-beat="0"] [data-story-scene="1"]:not([hidden]) .mc-consult-arm {
  animation-name: mc-conversation;
  animation-duration: 2.4s;
}

#workflow.ms-scene-products[data-story-beat="0"] [data-story-scene="1"]:not([hidden]) .mc-head,
#workflow.ms-scene-products[data-story-beat="2"] [data-story-scene="1"]:not([hidden]) .ms-actor-doctor .mc-head {
  animation-name: mc-listen-nod;
  animation-duration: 2.9s;
}

#workflow.ms-scene-products[data-story-beat="1"] [data-story-scene="1"]:not([hidden]) .mc-write-arm,
#workflow.ms-scene-products[data-story-beat="1"] [data-story-scene="2"]:not([hidden]) .ms-actor-doctor .mc-write-arm {
  animation-name: mc-write;
  animation-duration: 1.5s;
}

#workflow.ms-scene-products[data-story-beat="0"] [data-story-scene="2"]:not([hidden]) .ms-actor-manager .mc-review-arm,
#workflow.ms-scene-products[data-story-beat="2"] [data-story-scene="2"]:not([hidden]) .ms-actor-manager .mc-review-arm {
  animation-name: mc-review;
  animation-duration: 2s;
}

#workflow.ms-scene-products[data-story-beat="0"] [data-story-scene="2"]:not([hidden]) .ms-actor-manager .mc-head,
#workflow.ms-scene-products[data-story-beat="2"] [data-story-scene="2"]:not([hidden]) .ms-actor-manager .mc-head,
#workflow.ms-scene-products[data-story-beat="1"] [data-story-scene="2"]:not([hidden]) .ms-actor-doctor .mc-head {
  animation-name: mc-listen-nod;
  animation-duration: 2.6s;
}

@keyframes mc-phone-use {
  0%, 100% { transform: rotate(0); }
  35% { transform: rotate(-2deg); }
  65% { transform: rotate(.7deg); }
}

@keyframes mc-conversation {
  0%, 100% { transform: rotate(0); }
  45% { transform: rotate(-3deg); }
}

@keyframes mc-write {
  0%, 100% { transform: rotate(0); }
  35% { transform: rotate(-2.4deg); }
  65% { transform: rotate(.8deg); }
}

@keyframes mc-review {
  0%, 100% { transform: rotate(0); }
  45% { transform: rotate(-2.5deg); }
  70% { transform: rotate(.6deg); }
}

@keyframes mc-listen-nod {
  0%, 100% { transform: rotate(0); }
  45% { transform: rotate(1.4deg); }
  65% { transform: rotate(-.6deg); }
}

@keyframes mc-blink {
  0%, 93%, 100% { transform: scaleY(1); }
  95%, 97% { transform: scaleY(.12); }
}

@media (prefers-reduced-motion: reduce) {
  #workflow.ms-scene-products .mc-head,
  #workflow.ms-scene-products .mc-forearm,
  #workflow.ms-scene-products .mc-eyes {
    animation: none !important;
  }
}
