Query for TODO within time window

I want to query block with markers that is prioritized either A or B, and:

  • It’s marked with NOW
  • For other markers, it should have deadline or scheduled within next 3d.

I came up with following query, but it doesn’t work: it includes TODO further thant 3d ahead. How can i fix this?

#+BEGIN_QUERY
{:title [:h3 "🔥 Do now"]
 :query [:find (pull ?block [*])
 :where
   [?block :block/priority ?priority]
   [(contains? #{"A" "B"} ?priority)] ; Must be priority A, B => Important
   (or-join [?block]
     [?block :block/marker "NOW"] ; No deadline but super urgent
     (and
       [?block :block/marker ?marker]
       [(!= ?marker "NOW")] ; The marker is valid, not NOW
       (or-join [?block] ; then the urgent is deadline or scheduled within next 3d
         (and
           [?block :block/deadline ?deadline]
           [(<= ?deadline [:+3d])]
         )
         (and
           [?block :block/scheduled ?scheduled]
           [(<= ?scheduled [:+3d])]
         )
       )
     )
   )
 ]
}
#+END_QUERY